From: Heiko Carstens <heiko.carstens@de.ibm.com>
To: Julia Lawall <julia@diku.dk>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>,
linux390@de.ibm.com, linux-s390@vger.kernel.org,
linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH 7/12] drivers/s390: Correct size given to memset
Date: Wed, 9 Dec 2009 20:46:31 +0100 [thread overview]
Message-ID: <20091209194631.GA4351@osiris.boeblingen.de.ibm.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0912092024100.1870@ask.diku.dk>
On Wed, Dec 09, 2009 at 08:24:28PM +0100, Julia Lawall wrote:
> From: Julia Lawall <julia@diku.dk>
>
> Memset should be given the size of the structure, not the size of the pointer.
...
> - memset(tcat, 0, sizeof(tcat));
> + memset(tcat, 0, sizeof(*tcat));
> /* Calculate tcw input/output count and tcat transport count. */
> count = calc_dcw_count(tccb);
> if (tcw->w && (tcw->flags & TCW_FLAGS_OUTPUT_TIDA))
> @@ -269,7 +269,7 @@ EXPORT_SYMBOL(tccb_init);
> */
> void tsb_init(struct tsb *tsb)
> {
> - memset(tsb, 0, sizeof(tsb));
> + memset(tsb, 0, sizeof(*tsb));
Applied. Thank you!
prev parent reply other threads:[~2009-12-09 19:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-09 19:24 Julia Lawall
2009-12-09 19:46 ` Heiko Carstens [this message]
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=20091209194631.GA4351@osiris.boeblingen.de.ibm.com \
--to=heiko.carstens@de.ibm.com \
--cc=julia@diku.dk \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=linux390@de.ibm.com \
--cc=schwidefsky@de.ibm.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
all inboxes | Powered by JetHome®