- reuse return code of vsnprintf to avoid pulling in strlen
This commit is contained in:
parent
94feb1c807
commit
8eb0549e5d
@ -463,10 +463,10 @@ static void wrapf(const char *message, ...)
|
|||||||
int buflen;
|
int buflen;
|
||||||
|
|
||||||
va_start(args, message);
|
va_start(args, message);
|
||||||
vsnprintf(buf, sizeof(buf), message, args);
|
buflen = vsnprintf(buf, sizeof(buf), message, args);
|
||||||
va_end(args);
|
va_end(args);
|
||||||
buflen = strlen(buf);
|
/* buflen = strlen(buf); cheaper not to pull in strlen */
|
||||||
if (!buflen) return;
|
if (!buflen /*|| buflen >= sizeof(buf)*/) return;
|
||||||
|
|
||||||
if (current_col > 0) {
|
if (current_col > 0) {
|
||||||
current_col++;
|
current_col++;
|
||||||
|
Loading…
Reference in New Issue
Block a user