Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 8 Mar 2010 16:23:32 +0000 (UTC)
From:      Jaakko Heinonen <jh@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r204872 - head/usr.bin/xlint/lint1
Message-ID:  <201003081623.o28GNWKf043633@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jh
Date: Mon Mar  8 16:23:32 2010
New Revision: 204872
URL: http://svn.freebsd.org/changeset/base/204872

Log:
  Pass the correct size to memset().
  
  PR:		bin/128094
  Submitted by:	Henning Petersen
  MFC after:	1 week

Modified:
  head/usr.bin/xlint/lint1/scan.l

Modified: head/usr.bin/xlint/lint1/scan.l
==============================================================================
--- head/usr.bin/xlint/lint1/scan.l	Mon Mar  8 15:56:18 2010	(r204871)
+++ head/usr.bin/xlint/lint1/scan.l	Mon Mar  8 16:23:32 2010	(r204872)
@@ -319,7 +319,7 @@ allocsb(void)
 		if ((sb = malloc(sizeof (sbuf_t))) == NULL)
 			nomem();
 	}
-	(void)memset(sb, 0, sizeof (sb));
+	(void)memset(sb, 0, sizeof (*sb));
 	return (sb);
 }
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201003081623.o28GNWKf043633>