From f39d638489416a5c408e664733ffbce83c725c57 Mon Sep 17 00:00:00 2001 From: Johannes Löthberg Date: Sun, 18 Jan 2015 03:59:03 +0100 Subject: sds.c: add braces around naked while loops --- src/sds.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/sds.c b/src/sds.c index e396fb1..9f1383e 100644 --- a/src/sds.c +++ b/src/sds.c @@ -518,8 +518,9 @@ cleanup: /* Free the result returned by sdssplitlen(), or do nothing if 'tokens' is NULL. */ void sdsfreesplitres(sds *tokens, int count) { if (!tokens) return; - while(count--) + while(count--) { sdsfree(tokens[count]); + } free(tokens); } @@ -726,8 +727,9 @@ sds *sdssplitargs(const char *line, int *argc) { } err: - while((*argc)--) + while((*argc)--) { sdsfree(vector[*argc]); + } free(vector); if (current) sdsfree(current); *argc = 0; -- cgit v1.2.3-70-g09d2