mirror of
https://github.com/X11Libre/xf86-input-libinput.git
synced 2026-03-24 01:24:04 +00:00
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:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user