mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2025-01-24 01:57:06 +01:00
Use explicit braces to avoid ambiguous else.
This commit is contained in:
parent
f2588359cb
commit
82417e9f03
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=165029
@ -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