From 3f4cfa338b5035b3789ea414eab9f139a18d140b Mon Sep 17 00:00:00 2001 From: Craig Barnes Date: Thu, 14 Jan 2021 21:30:06 +0000 Subject: Add xsnprintf() and remove some unnecessary strlen(3) calls --- xsnprintf.h | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 xsnprintf.h (limited to 'xsnprintf.h') diff --git a/xsnprintf.h b/xsnprintf.h new file mode 100644 index 00000000..c745ef3e --- /dev/null +++ b/xsnprintf.h @@ -0,0 +1,8 @@ +#pragma once + +#include +#include +#include "macros.h" + +size_t xsnprintf(char *buf, size_t len, const char *fmt, ...) PRINTF(3) NONNULL_ARGS; +size_t xvsnprintf(char *buf, size_t len, const char *fmt, va_list ap) VPRINTF(3) NONNULL_ARGS; -- cgit v1.3