mirror of
https://gitlab.freedesktop.org/libinput/libei.git
synced 2025-12-27 18:30:09 +01:00
util: add a realloc helper
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
d017eb1a91
commit
89408c9e2e
1 changed files with 7 additions and 0 deletions
|
|
@ -90,3 +90,10 @@ xalloc(size_t size)
|
|||
return p;
|
||||
}
|
||||
|
||||
static inline void *
|
||||
xrealloc(void *ptr, int size)
|
||||
{
|
||||
void *tmp = realloc(ptr, size);
|
||||
assert(tmp);
|
||||
return tmp;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue