]> git.marmaro.de Git - mmh/blobdiff - sbr/getarguments.c
Replace mh_xmalloc() with mh_xcalloc()
[mmh] / sbr / getarguments.c
index ce33c2eaec9fecccd94394ce192a7d02f881c428..a700443661a85b08fb1951e8b5f2c076710ce87b 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++;