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 <info@metux.net>
This commit is contained in:
Enrico Weigelt, metux IT consult
2025-04-16 12:48:16 +02:00
parent 2146a29bdf
commit 7d617d1150

View File

@@ -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)
{