[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20091209194631.GA4351@osiris.boeblingen.de.ibm.com>
Date: Wed, 9 Dec 2009 20:46:31 +0100
From: Heiko Carstens <heiko.carstens@...ibm.com>
To: Julia Lawall <julia@...u.dk>
Cc: Martin Schwidefsky <schwidefsky@...ibm.com>, linux390@...ibm.com,
linux-s390@...r.kernel.org, linux-kernel@...r.kernel.org,
kernel-janitors@...r.kernel.org
Subject: Re: [PATCH 7/12] drivers/s390: Correct size given to memset
On Wed, Dec 09, 2009 at 08:24:28PM +0100, Julia Lawall wrote:
> From: Julia Lawall <julia@...u.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!
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists