mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Back out experimental changes to fmtstr() that I didn't mean to include
in the previous commit.
This commit is contained in:
parent
7206028152
commit
658a755b6a
1 changed files with 9 additions and 1 deletions
|
|
@ -263,10 +263,18 @@ void
|
|||
fmtstr(char *outbuf, int length, const char *fmt, ...)
|
||||
{
|
||||
va_list ap;
|
||||
struct output strout;
|
||||
|
||||
strout.nextc = outbuf;
|
||||
strout.nleft = length;
|
||||
strout.fd = BLOCK_OUT;
|
||||
strout.flags = 0;
|
||||
va_start(ap, fmt);
|
||||
snprintf(outbuf, length, fmt, ap);
|
||||
doformat(&strout, fmt, ap);
|
||||
va_end(ap);
|
||||
outc('\0', &strout);
|
||||
if (strout.flags & OUTPUT_ERR)
|
||||
outbuf[length - 1] = '\0';
|
||||
}
|
||||
|
||||
static int
|
||||
|
|
|
|||
Loading…
Reference in a new issue