summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHiltjo Posthuma <hiltjo@codemadness.org>2016-03-02 20:44:48 +0100
committerHiltjo Posthuma <hiltjo@codemadness.org>2016-03-02 20:44:48 +0100
commit9e979da3399e46e243a5dc9023a0c77e0f6377a2 (patch)
treebbacfb340d57e8c51a7b45198bd938339d330f10
parent5bbec445477ebb16e88596a56db2034da90de325 (diff)
sfeed: no need to call strlen, we know the length already
-rw-r--r--sfeed.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sfeed.c b/sfeed.c
index 1e0e925..553062f 100644
--- a/sfeed.c
+++ b/sfeed.c
@@ -380,7 +380,7 @@ string_print_encoded(String *s)
for (p = s->data; *p && isspace((int)*p); p++)
;
/* seek offset of trailing whitespace */
- for (e = p + strlen(p); e > p && isspace((int)*(e - 1)); e--)
+ for (e = s->data + s->len; e > p && isspace((int)*(e - 1)); e--)
;
for (; *p && p != e; p++) {
@@ -411,7 +411,7 @@ string_print_trimmed(String *s)
for (p = s->data; *p && isspace((int)*p); p++)
;
/* seek offset of trailing whitespace */
- for (e = p + strlen(p); e > p && isspace((int)*(e - 1)); e--)
+ for (e = s->data + s->len; e > p && isspace((int)*(e - 1)); e--)
;
for (; *p && p != e; p++) {