]> diplodocus.org Git - nmh/commitdiff
Fix bug found by LLVM.
authorKen Hornstein <kenh@pobox.com>
Mon, 28 Oct 2013 02:31:50 +0000 (22:31 -0400)
committerKen Hornstein <kenh@pobox.com>
Mon, 28 Oct 2013 02:31:50 +0000 (22:31 -0400)
uip/replsbr.c

index 3557c9ec14d56b961e1077d2277eebc0c490d20b..ee404efd7118bff11ae4eeb4a5a51cab4af6a61c 100644 (file)
@@ -434,6 +434,8 @@ replfilter (FILE *in, FILE *out, char *filter, int fmtproc)
     rewind (in);
     lseek (fileno(in), (off_t) 0, SEEK_SET);
 
     rewind (in);
     lseek (fileno(in), (off_t) 0, SEEK_SET);
 
+    arglist = argsplit(mhlproc, &mhl, &argnum);
+
     switch (pid = fork()) {
        case NOTOK: 
            adios ("fork", "unable to");
     switch (pid = fork()) {
        case NOTOK: 
            adios ("fork", "unable to");
@@ -448,7 +450,6 @@ replfilter (FILE *in, FILE *out, char *filter, int fmtproc)
             * because we never call arglist_free().  But if we ever change
             * that be sure to use getcpy() for the extra arguments.
             */
             * because we never call arglist_free().  But if we ever change
             * that be sure to use getcpy() for the extra arguments.
             */
-           arglist = argsplit(mhlproc, &mhl, &argnum);
            arglist[argnum++] = "-form";
            arglist[argnum++] = filter;
            arglist[argnum++] = "-noclear";
            arglist[argnum++] = "-form";
            arglist[argnum++] = filter;
            arglist[argnum++] = "-noclear";