mirror of
https://github.com/clearlinux/systemd-stable.git
synced 2026-08-28 03:27:35 +00:00
util: introduce memdup()
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user