From: Jim Meyering <jim@meyering.net>
To: dm-devel@redhat.com
Subject: tiny patch: avoid an unnecessary test
Date: Fri, 16 Mar 2007 09:28:43 +0100 [thread overview]
Message-ID: <87fy85bnic.fsf@rho.meyering.net> (raw)
Not a big deal (barely worth mentioning), but it might save
someone else a little time wondering "why".
2007-03-11 Jim Meyering <jim@meyering.net>
Remove unnecessary test.
* dmeventd/dmeventd.c (_alloc_dso_data): Don't test known-non-NULL
memset return value.
2007-03-11 Jim Meyering <jim@meyering.net>
Index: dmeventd/dmeventd.c
===================================================================
RCS file: /cvs/dm/device-mapper/dmeventd/dmeventd.c,v
retrieving revision 1.46
diff -u -p -r1.46 dmeventd.c
--- dmeventd/dmeventd.c 2 Feb 2007 17:08:51 -0000 1.46
+++ dmeventd/dmeventd.c 12 Mar 2007 14:39:35 -0000
@@ -258,8 +258,8 @@ static struct dso_data *_alloc_dso_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;
}
next reply other threads:[~2007-03-16 8:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-16 8:28 Jim Meyering [this message]
2007-03-16 13:47 ` tiny patch: avoid an unnecessary test AJ Lewis
2007-03-16 14:25 ` AJ Lewis
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87fy85bnic.fsf@rho.meyering.net \
--to=jim@meyering.net \
--cc=dm-devel@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.