mirror of
https://github.com/AuxXxilium/eudev.git
synced 2024-12-28 06:35:34 +07:00
util: introduce memdup()
This commit is contained in:
parent
c3175a7f40
commit
888c710235
@ -100,6 +100,8 @@ bool streq_ptr(const char *a, const char *b);
|
||||
|
||||
#define new0(t, n) ((t*) calloc((n), sizeof(t)))
|
||||
|
||||
#define newdup(t, p, n) ((t*) memdup(p, sizeof(t)*(n))
|
||||
|
||||
#define malloc0(n) (calloc((n), 1))
|
||||
|
||||
static inline const char* yes_no(bool b) {
|
||||
|
Loading…
Reference in New Issue
Block a user