From 619bcc38e91b4acd36c90aa0acb6fc1832f5871a Mon Sep 17 00:00:00 2001 From: Steffen Jaeckel Date: Tue, 1 Feb 2022 13:37:00 +0100 Subject: [PATCH] make `[v]snprintf()` private Fixes #189 Signed-off-by: Steffen Jaeckel --- src/snprintf.c | 4 ++-- src/snprintf.h | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/snprintf.c b/src/snprintf.c index d39123f..93b9bad 100644 --- a/src/snprintf.c +++ b/src/snprintf.c @@ -706,7 +706,7 @@ static int dopr_outch(char *buffer, size_t *currlen, size_t maxlen, char c) return 1; } -int xmpp_vsnprintf(char *str, size_t count, const char *fmt, va_list args) +int strophe_vsnprintf(char *str, size_t count, const char *fmt, va_list args) { if (str != NULL && count > 0) str[0] = 0; @@ -716,7 +716,7 @@ int xmpp_vsnprintf(char *str, size_t count, const char *fmt, va_list args) #ifndef HAVE_SNPRINTF /* VARARGS3 */ -int xmpp_snprintf(char *str, size_t count, const char *fmt, ...) +int strophe_snprintf(char *str, size_t count, const char *fmt, ...) { VA_LOCAL_DECL; int total; diff --git a/src/snprintf.h b/src/snprintf.h index 1f005cc..4a58f49 100644 --- a/src/snprintf.h +++ b/src/snprintf.h @@ -22,13 +22,15 @@ #ifdef HAVE_SNPRINTF #define xmpp_snprintf snprintf #else -int xmpp_snprintf(char *str, size_t count, const char *fmt, ...); +#define xmpp_snprintf strophe_snprintf +int strophe_snprintf(char *str, size_t count, const char *fmt, ...); #endif #ifdef HAVE_VSNPRINTF #define xmpp_vsnprintf vsnprintf #else -int xmpp_vsnprintf(char *str, size_t count, const char *fmt, va_list arg); +#define xmpp_vsnprintf strophe_vsnprintf +int strophe_vsnprintf(char *str, size_t count, const char *fmt, va_list arg); #endif #endif /* __LIBSTROPHE_SNPRINTF_H__ */