41 if (char_count == 0 || char_count > INT_MAX) {
46 int ret = vsnprintf(chars, char_count, fmt, args);
52 if ((
size_t)ret > char_count - 1) {
53 return (
int)char_count - 1;
61u_truncate_snprintf(
char *chars,
size_t char_count,
const char *fmt, ...) XRT_PRINTF_FORMAT(3, 4);
78 if (char_count == 0 || char_count > INT_MAX) {
static int u_truncate_snprintf(char *chars, size_t char_count, const char *fmt,...) XRT_PRINTF_FORMAT(3
We want to truncate the value, not get the possible written, and error when we can not write out anyt...
Definition u_truncate_printf.h:72
static int u_truncate_vsnprintf(char *chars, size_t char_count, const char *fmt, va_list args)
We want to truncate the value, not get the possible written.
Definition u_truncate_printf.h:35
Header holding common defines.