diff options
author | Hiltjo Posthuma <hiltjo@codemadness.org> | 2016-03-02 20:44:48 +0100 |
---|---|---|
committer | Hiltjo Posthuma <hiltjo@codemadness.org> | 2016-03-02 20:44:48 +0100 |
commit | 9e979da3399e46e243a5dc9023a0c77e0f6377a2 (patch) | |
tree | bbacfb340d57e8c51a7b45198bd938339d330f10 | |
parent | 5bbec445477ebb16e88596a56db2034da90de325 (diff) |
sfeed: no need to call strlen, we know the length already
-rw-r--r-- | sfeed.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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++) { |