Archived
1
0
Fork 0

strbuf.c: make 'strbuf_rtrim' alittle more readable

This commit is contained in:
Henrik Hautakoski 2010-11-15 19:24:08 +01:00
parent c558135c63
commit 925972faa5

View file

@ -130,7 +130,8 @@ void strbuf_trim(strbuf_t *s) {
void strbuf_rtrim(strbuf_t *s) {
for(; s->len && isspace(s->buf[s->len-1]); s->len--);
while(s->len && isspace(s->buf[s->len-1]))
s->len--;
s->buf[s->len] = '\0';
}