diff options
author | Alasdair Kergon <agk@redhat.com> | 2010-09-30 21:06:50 +0000 |
---|---|---|
committer | Alasdair Kergon <agk@redhat.com> | 2010-09-30 21:06:50 +0000 |
commit | ac0252ca07e3be5bbb439c913d71c43f551e30ce (patch) | |
tree | 45d08af849560161cd6570fa0ff123cc770f1a70 /daemons/dmeventd | |
parent | 0ca1492ca52365cc86aeaf623e370290446ba16f (diff) | |
download | lvm2-ac0252ca07e3be5bbb439c913d71c43f551e30ce.tar.gz lvm2-ac0252ca07e3be5bbb439c913d71c43f551e30ce.tar.xz lvm2-ac0252ca07e3be5bbb439c913d71c43f551e30ce.zip |
Add dm_zalloc and use it and dm_pool_zalloc throughout.
Diffstat (limited to 'daemons/dmeventd')
-rw-r--r-- | daemons/dmeventd/dmeventd.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/daemons/dmeventd/dmeventd.c b/daemons/dmeventd/dmeventd.c index cc1e4a72..4889b7cf 100644 --- a/daemons/dmeventd/dmeventd.c +++ b/daemons/dmeventd/dmeventd.c @@ -223,12 +223,11 @@ static void _debuglog(const char *fmt, ...) static struct thread_status *_alloc_thread_status(struct message_data *data, struct dso_data *dso_data) { - struct thread_status *ret = (typeof(ret)) dm_malloc(sizeof(*ret)); + struct thread_status *ret = (typeof(ret)) dm_zalloc(sizeof(*ret)); if (!ret) return NULL; - memset(ret, 0, sizeof(*ret)); if (!(ret->device.uuid = dm_strdup(data->device_uuid))) { dm_free(ret); return NULL; @@ -259,12 +258,11 @@ static void _free_thread_status(struct thread_status *thread) /* Allocate/free DSO data. */ static struct dso_data *_alloc_dso_data(struct message_data *data) { - struct dso_data *ret = (typeof(ret)) dm_malloc(sizeof(*ret)); + struct dso_data *ret = (typeof(ret)) dm_zalloc(sizeof(*ret)); if (!ret) return NULL; - memset(ret, 0, sizeof(*ret)); if (!(ret->dso_name = dm_strdup(data->dso_name))) { dm_free(ret); return NULL; |