lkml.org 
[lkml]   [2009]   [Dec]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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@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!


\
 
 \ /
  Last update: 2009-12-09 20:49    [W:0.027 / U:51.768 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site