Use explicit braces to avoid ambiguous else.
This commit is contained in:
parent
f2588359cb
commit
82417e9f03
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user