From 9a4fba02519efc4382fd605ec144ace2fd461798 Mon Sep 17 00:00:00 2001 From: sin Date: Mon, 10 Feb 2014 19:28:39 +0000 Subject: [PATCH] Use calloc() instead of malloc() + memset() --- insmod.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/insmod.c b/insmod.c index 484c544..730b71a 100644 --- a/insmod.c +++ b/insmod.c @@ -51,10 +51,9 @@ main(int argc, char *argv[]) plen += strlen(argv[i]); if (plen > 0) { plen += argc; - opts = malloc(plen); + opts = calloc(1, plen); if (!opts) eprintf("malloc:"); - memset(opts, 0, plen); for (i = 0; i < argc; i++) { strcat(opts, argv[i]); if (i + 1 < argc)