Replace mh_xmalloc() with mh_xcalloc()
[mmh] / sbr / getarguments.c
index ce33c2e..a700443 100644 (file)
@@ -28,14 +28,14 @@ getarguments(char *invo_name, int argc, char **argv, int check_context)
                        n++;
        }
 
-       arguments = (char **) mh_xmalloc((argc + n) * sizeof(*arguments));
+       arguments = (char **) mh_xcalloc(argc + n, sizeof(*arguments));
        bp = arguments;
 
        /* Copy any arguments from profile/context */
        if (ap != NULL && n > 0) {
                while (*ap)
                        *bp++ = *ap++;
-        }
+       }
 
        /* Copy arguments from command line */
        argv++;