diff options
Diffstat (limited to 'src/doprnt.c')
| -rw-r--r-- | src/doprnt.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/doprnt.c b/src/doprnt.c index 44dc641d5dd..63f05cb74e2 100644 --- a/src/doprnt.c +++ b/src/doprnt.c @@ -161,10 +161,9 @@ doprnt (char *buffer, ptrdiff_t bufsize, const char *format, if (format_end == 0) format_end = format + strlen (format); - if (format_end - format < sizeof (fixed_buffer) - 1) - fmtcpy = fixed_buffer; - else - SAFE_ALLOCA (fmtcpy, char *, format_end - format + 1); + fmtcpy = (format_end - format < sizeof (fixed_buffer) - 1 + ? fixed_buffer + : SAFE_ALLOCA (format_end - format + 1)); bufsize--; |
