From: Benjamin Marzinski <bmarzins@redhat.com>
To: lixiaokeng <lixiaokeng@huawei.com>
Cc: linfeilong <linfeilong@huawei.com>,
dm-devel mailing list <dm-devel@redhat.com>,
Martin Wilck <mwilck@suse.com>,
"liuzhiqiang \(I\)" <liuzhiqiang26@huawei.com>
Subject: Re: [dm-devel] [PATCH 2/5] remove unnecessary memset
Date: Wed, 17 Nov 2021 18:10:35 -0600 [thread overview]
Message-ID: <20211118001035.GD19591@octiron.msp.redhat.com> (raw)
In-Reply-To: <c410b6c9-4d46-bb64-4336-89c7af7600bc@huawei.com>
On Tue, Nov 16, 2021 at 09:59:41PM +0800, lixiaokeng wrote:
> MALLOC will set memory zero. memset is unnecessary.
> Remove it.
>
> Signed-off-by: Lixiaokeng <lixiaokeng@huawei.com>
Reviewed-by: Benjamin Marzinski <bmarzins@redhat.com>
> ---
> libmultipath/log.c | 1 -
> multipathd/waiter.c | 1 -
> 2 files changed, 2 deletions(-)
>
> diff --git a/libmultipath/log.c b/libmultipath/log.c
> index 10fa32cd..f41efb5b 100644
> --- a/libmultipath/log.c
> +++ b/libmultipath/log.c
> @@ -57,7 +57,6 @@ static int logarea_init (int size)
> FREE(la);
> return 1;
> }
> - memset(la->start, 0, size);
>
> la->empty = 1;
> la->end = la->start + size;
> diff --git a/multipathd/waiter.c b/multipathd/waiter.c
> index bbe6c2a1..f74b395a 100644
> --- a/multipathd/waiter.c
> +++ b/multipathd/waiter.c
> @@ -33,7 +33,6 @@ static struct event_thread *alloc_waiter (void)
> struct event_thread *wp;
>
> wp = (struct event_thread *)MALLOC(sizeof(struct event_thread));
> - memset(wp, 0, sizeof(struct event_thread));
>
> return wp;
> }
> --
--
dm-devel mailing list
dm-devel@redhat.com
https://listman.redhat.com/mailman/listinfo/dm-devel
next prev parent reply other threads:[~2021-11-18 0:15 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-16 13:58 [dm-devel] [PATCH 0/5] multipath-tools series: some codeclean and add prflag to path lixiaokeng
2021-11-16 13:59 ` [dm-devel] [PATCH 1/5] Fix potential null pointer dereference lixiaokeng
2021-11-17 18:05 ` Benjamin Marzinski
2021-11-18 2:04 ` lixiaokeng
2021-11-16 13:59 ` [dm-devel] [PATCH 2/5] remove unnecessary memset lixiaokeng
2021-11-18 0:10 ` Benjamin Marzinski [this message]
2021-11-16 14:00 ` [dm-devel] [PATCH 3/5] remove unnecessary free lixiaokeng
2021-11-18 0:14 ` Benjamin Marzinski
2021-11-16 14:00 ` [dm-devel] [PATCH 4/5] Match FREE and MALLOC/STRDUP/REALLOC lixiaokeng
2021-11-18 0:47 ` Benjamin Marzinski
2021-11-18 2:46 ` lixiaokeng
2021-11-18 15:35 ` Martin Wilck
2021-11-18 15:31 ` Martin Wilck
2021-11-16 14:01 ` [dm-devel] [PATCH 5/5] add prflag to path lixiaokeng
2021-11-18 15:36 ` Martin Wilck
2021-11-18 16:57 ` Benjamin Marzinski
2021-11-19 8:41 ` lixiaokeng
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=20211118001035.GD19591@octiron.msp.redhat.com \
--to=bmarzins@redhat.com \
--cc=dm-devel@redhat.com \
--cc=linfeilong@huawei.com \
--cc=liuzhiqiang26@huawei.com \
--cc=lixiaokeng@huawei.com \
--cc=mwilck@suse.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox