From 925972faa5db59149277503adcfc16c9a0e02189 Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Mon, 15 Nov 2010 19:24:08 +0100 Subject: [PATCH] strbuf.c: make 'strbuf_rtrim' alittle more readable --- src/strbuf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/strbuf.c b/src/strbuf.c index fc3ac9f..0e9b397 100644 --- a/src/strbuf.c +++ b/src/strbuf.c @@ -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'; }