From e3d86ea9ed4d08a04b753ee26adbb34eafe2ae21 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Thu, 6 Nov 2025 17:26:30 +0100 Subject: [PATCH] [PR #1355] os: make XNFvasprintf() static PR: https://github.com/X11Libre/xserver/pull/1355 --- include/Xprintf.h | 3 --- os/xprintf.c | 5 ++++- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/Xprintf.h b/include/Xprintf.h index 382e24f63f..30aecdc9cf 100644 --- a/include/Xprintf.h +++ b/include/Xprintf.h @@ -53,8 +53,5 @@ extern _X_EXPORT int /* deprecated */ XNFasprintf(char **ret, const char *_X_RESTRICT_KYWD fmt, ...) _X_ATTRIBUTE_PRINTF(2, 3); -extern _X_EXPORT int -XNFvasprintf(char **ret, const char *_X_RESTRICT_KYWD fmt, va_list va) -_X_ATTRIBUTE_VPRINTF(2, 0); #endif /* XPRINTF_H */ diff --git a/os/xprintf.c b/os/xprintf.c index 1fe1259d60..194c6f1e7b 100644 --- a/os/xprintf.c +++ b/os/xprintf.c @@ -67,6 +67,9 @@ #include "include/os.h" #include "include/Xprintf.h" +static int XNFvasprintf(char **ret, const char *_X_RESTRICT_KYWD fmt, va_list va) +_X_ATTRIBUTE_PRINTF(2, 0); + /** * Varargs sprintf that allocates a string buffer the right size for * the pattern & data provided and prints the requested data to it. @@ -78,7 +81,7 @@ * @param va variable argument list * @return size of allocated buffer */ -int +static int XNFvasprintf(char **ret, const char *_X_RESTRICT_KYWD format, va_list va) { int size = vasprintf(ret, format, va);