]>
The Tcpdump Group git mirrors - libpcap/blob - missing/win_asprintf.c
5 #include "portability.h"
8 pcapint_vasprintf(char **strp
, const char *format
, va_list args
)
15 len
= _vscprintf(format
, args
);
21 str
= malloc(str_size
);
26 ret
= vsnprintf(str
, str_size
, format
, args
);
34 * vsnprintf() shouldn't truncate the string, as we have
35 * allocated a buffer large enough to hold the string, so its
36 * return value should be the number of characters printed.
42 pcapint_asprintf(char **strp
, const char *format
, ...)
47 va_start(args
, format
);
48 ret
= pcapint_vasprintf(strp
, format
, args
);