mirror of
https://gitlab.nic.cz/labs/bird.git
synced 2024-11-09 12:48:43 +00:00
Oops, forgot '%m'...
This commit is contained in:
parent
9556f22585
commit
d997534f65
@ -9,6 +9,9 @@
|
||||
#include "nest/bird.h"
|
||||
#include "string.h"
|
||||
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
|
||||
/* we use this so that we can do without the ctype library */
|
||||
#define is_digit(c) ((c) >= '0' && (c) <= '9')
|
||||
|
||||
@ -184,11 +187,15 @@ int bvsprintf(char *buf, const char *fmt, va_list args)
|
||||
*str++ = ' ';
|
||||
continue;
|
||||
|
||||
case 'm':
|
||||
s = strerror(errno);
|
||||
goto str;
|
||||
case 's':
|
||||
s = va_arg(args, char *);
|
||||
if (!s)
|
||||
s = "<NULL>";
|
||||
|
||||
str:
|
||||
len = strlen(s);
|
||||
if (precision >= 0 && len > precision)
|
||||
len = precision;
|
||||
|
Loading…
Reference in New Issue
Block a user