From: Sami Kerola Date: Sun, 5 Mar 2017 20:52:24 +0000 (+0000) Subject: blkid: add curly braces to do-while statement X-Git-Tag: v2.30-rc1~186 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=126d8cf35b4403b575056304c966e9dd489f4aa9;p=thirdparty%2Futil-linux.git blkid: add curly braces to do-while statement Some say people read do-while statements are easily as while statements and get wrong impression. This happens because do-whiles are not common. Adding braces should make it easier to read the code. Reference: http://www.spinics.net/lists/linux-kernel-janitors/msg02018.html Signed-off-by: Sami Kerola --- diff --git a/misc-utils/blkid.c b/misc-utils/blkid.c index 9278553c70..7bbb54dfd5 100644 --- a/misc-utils/blkid.c +++ b/misc-utils/blkid.c @@ -139,9 +139,9 @@ static int pretty_print_word(const char *str, int max_len, len = 0; } else if (len > max_len) ret = len - max_len; - do + do { fputc(' ', stdout); - while (len++ < max_len); + } while (len++ < max_len); return ret; }