mirror of
https://github.com/clearlinux/systemd-stable.git
synced 2026-09-06 21:51:37 +00:00
util: make malloc0 ask calloc for one block of size n
... instead of an array of n individual bytes. Silences a lot of warnings in smatch.
This commit is contained in:
+1
-1
@@ -83,7 +83,7 @@ int strcmp_ptr(const char *a, const char *b) _pure_;
|
||||
|
||||
#define newdup(t, p, n) ((t*) memdup_multiply(p, sizeof(t), (n)))
|
||||
|
||||
#define malloc0(n) (calloc((n), 1))
|
||||
#define malloc0(n) (calloc(1, (n)))
|
||||
|
||||
static inline void *mfree(void *memory) {
|
||||
free(memory);
|
||||
|
||||
Reference in New Issue
Block a user