From 2349e65b954fea51b8621248e2ba55f38a71e94f Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Tue, 20 May 2025 16:35:18 +0200 Subject: [PATCH] (!1999) include: os: add returns_nonnull attribute to XNFalloc/XNFcallocarray Signed-off-by: Enrico Weigelt, metux IT consult --- include/os.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/os.h b/include/os.h index 9a193ae66..1b1076036 100644 --- a/include/os.h +++ b/include/os.h @@ -146,7 +146,7 @@ extern _X_EXPORT void GiveUp(int /*sig */ ); * enough memory. */ extern _X_EXPORT void * -XNFalloc(unsigned long /*amount */ ); +XNFalloc(unsigned long /*amount */ ) __attribute__((returns_nonnull));; /* * This function calloc(3)s buffer, terminating the server if there is not @@ -160,7 +160,7 @@ XNFcalloc(unsigned long /*amount */ ) _X_DEPRECATED; * enough memory or the arguments overflow when multiplied */ extern _X_EXPORT void * -XNFcallocarray(size_t nmemb, size_t size); +XNFcallocarray(size_t nmemb, size_t size) __attribute__((returns_nonnull));; /* * This function realloc(3)s passed buffer, terminating the server if there is