mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-04 04:06:06 -05:00
config: handle allocation failure explicitly
This commit is contained in:
parent
c07d14e1c0
commit
f1fce96a1d
6 changed files with 223 additions and 68 deletions
10
xmalloc.h
Normal file
10
xmalloc.h
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
#pragma once
|
||||
|
||||
#include <stddef.h>
|
||||
#include <string.h>
|
||||
#include "macros.h"
|
||||
|
||||
void *xmalloc(size_t size) XMALLOC;
|
||||
void *xcalloc(size_t nmemb, size_t size) XMALLOC;
|
||||
char *xstrdup(const char *str) XSTRDUP;
|
||||
char *xasprintf(const char *format, ...) PRINTF(1) XMALLOC;
|
||||
Loading…
Add table
Add a link
Reference in a new issue