]>
The Tcpdump Group git mirrors - libpcap/blob - missing/win_snprintf.c
5 pcap_vsnprintf(char *str
, size_t str_size
, const char *format
, va_list args
)
9 ret
= _vsnprintf_s(str
, str_size
, _TRUNCATE
, format
, args
);
12 * XXX - _vsnprintf() and _snprintf() do *not* guarantee
13 * that str is null-terminated, but C99's vsnprintf()
14 * and snprintf() do, and we want to offer C99 behavior,
15 * so forcibly null-terminate the string.
17 str
[str_size
- 1] = '\0';
22 pcap_snprintf(char *str
, size_t str_size
, const char *format
, ...)
27 va_start(args
, format
);
28 ret
= pcap_vsnprintf(str
, str_size
, format
, args
);