Author: ngie Date: Mon Jan 9 06:03:49 2017 New Revision: 311754 URL: https://svnweb.freebsd.org/changeset/base/311754
Log: Use calloc instead of malloc + memset(.., 0, ..) MFC after: 5 days Modified: head/contrib/bsnmp/gensnmpdef/gensnmpdef.c Modified: head/contrib/bsnmp/gensnmpdef/gensnmpdef.c ============================================================================== --- head/contrib/bsnmp/gensnmpdef/gensnmpdef.c Mon Jan 9 05:58:48 2017 (r311753) +++ head/contrib/bsnmp/gensnmpdef/gensnmpdef.c Mon Jan 9 06:03:49 2017 (r311754) @@ -399,12 +399,11 @@ static void save_typdef(char *name) { struct tdef *t; - t = malloc(sizeof(struct tdef)); + t = calloc(1, sizeof(struct tdef)); if (t == NULL) err(1, NULL); - memset(t, 0 , sizeof(struct tdef)); t->name = name; SLIST_INSERT_HEAD(&tdefs, t, link); } _______________________________________________ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"