summaryrefslogtreecommitdiffstats
path: root/usr.bin/jot
diff options
context:
space:
mode:
authordelphij <delphij@FreeBSD.org>2006-12-09 15:23:20 +0000
committerdelphij <delphij@FreeBSD.org>2006-12-09 15:23:20 +0000
commitae1fcdf22fb13bbfb4f80a0cada3a0884d5ff5f7 (patch)
tree49834aeb1abbe22c9dd56cd75c23ca8c52fc2312 /usr.bin/jot
parentf458d34cdf980a9ced5e6ff9f0dfaacba4ebce07 (diff)
downloadFreeBSD-src-ae1fcdf22fb13bbfb4f80a0cada3a0884d5ff5f7.zip
FreeBSD-src-ae1fcdf22fb13bbfb4f80a0cada3a0884d5ff5f7.tar.gz
Use explicit braces to avoid ambiguous else.
Diffstat (limited to 'usr.bin/jot')
-rw-r--r--usr.bin/jot/jot.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.bin/jot/jot.c b/usr.bin/jot/jot.c
index 088903f..2e58968 100644
--- a/usr.bin/jot/jot.c
+++ b/usr.bin/jot/jot.c
@@ -393,11 +393,12 @@ getformat(void)
if (boring) /* no need to bother */
return;
for (p = format; *p; p++) /* look for '%' */
- if (*p == '%')
+ if (*p == '%') {
if (p[1] == '%')
p++; /* leave %% alone */
else
break;
+ }
sz = sizeof(format) - strlen(format) - 1;
if (!*p && !chardata) {
if (snprintf(p, sz, "%%.%df", prec) >= (int)sz)
OpenPOWER on IntegriCloud