From 7d617d1150f9c13de0aa503cba9a191b3cbd4fe8 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Wed, 16 Apr 2025 12:48:16 +0200 Subject: [PATCH] util-strings: drop unused zalloc() Not used anywhere. And crashing the Xserver on alloc failure really isn't a good idea anyways. Signed-off-by: Enrico Weigelt, metux IT consult --- src/util-strings.h | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/src/util-strings.h b/src/util-strings.h index 559a15d..8df8a08 100644 --- a/src/util-strings.h +++ b/src/util-strings.h @@ -43,23 +43,6 @@ #include "util-macros.h" -static inline void * -zalloc(size_t size) -{ - void *p; - - /* We never need to alloc anything more than 1,5 MB so we can assume - * if we ever get above that something's going wrong */ - if (size > 1536 * 1024) - assert(!"bug: internal malloc size limit exceeded"); - - p = calloc(1, size); - if (!p) - abort(); - - return p; -} - static inline bool safe_atou_base(const char *str, unsigned int *val, int base) {