svn commit: r204872 - head/usr.bin/xlint/lint1

Jaakko Heinonen jh at FreeBSD.org
Mon Mar 8 16:23:32 UTC 2010


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);
 }
 


More information about the svn-src-head mailing list