From c2784df48f4b5a20f085ffded7582a57cde73dc7 Mon Sep 17 00:00:00 2001 From: Alasdair Kergon Date: Fri, 16 Mar 2007 14:36:14 +0000 Subject: [PATCH] Remove unnecessary memset() return value checks. [Jim Meyering] --- WHATS_NEW_DM | 1 + daemons/dmeventd/dmeventd.c | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/WHATS_NEW_DM b/WHATS_NEW_DM index 48398e63a..87e3ed507 100644 --- a/WHATS_NEW_DM +++ b/WHATS_NEW_DM @@ -1,5 +1,6 @@ Version 1.02.19 - ==================================== + Remove unnecessary memset() return value checks. Fix a few leaks in reporting error paths. [1.02.15+] Version 1.02.18 - 13th February 2007 diff --git a/daemons/dmeventd/dmeventd.c b/daemons/dmeventd/dmeventd.c index f1462b381..999a936c0 100644 --- a/daemons/dmeventd/dmeventd.c +++ b/daemons/dmeventd/dmeventd.c @@ -226,8 +226,8 @@ static struct thread_status *_alloc_thread_status(struct message_data *data, if (!ret) return NULL; - if (!memset(ret, 0, sizeof(*ret)) || - !(ret->device.uuid = dm_strdup(data->device_uuid))) { + memset(ret, 0, sizeof(*ret)); + if (!(ret->device.uuid = dm_strdup(data->device_uuid))) { dm_free(ret); return NULL; } @@ -258,8 +258,8 @@ static struct dso_data *_alloc_dso_data(struct message_data *data) if (!ret) return NULL; - if (!memset(ret, 0, sizeof(*ret)) || - !(ret->dso_name = dm_strdup(data->dso_name))) { + memset(ret, 0, sizeof(*ret)); + if (!(ret->dso_name = dm_strdup(data->dso_name))) { dm_free(ret); return NULL; }