]> diplodocus.org Git - nmh/blobdiff - uip/mkstemp.c
Alter HasSuffixC()'s char * to be const.
[nmh] / uip / mkstemp.c
index d594c3621313f3da0ff829c87b7551787c752cf9..f4215c0804526e864c4c84b91febf6923d4817a4 100644 (file)
@@ -104,15 +104,15 @@ build_template(const char *directory, const char *prefix, const char *suffix) {
         tp += sizeof pattern - 1;
 
         (void) strncpy(tp, suffix, suffix_len);
-        tp += suffix_len;
+        /* tp += suffix_len; */
 
         template[len-1] = '\0';
 
         return template;
-    } else {
-        perror("malloc");
-        return NULL;
     }
+
+    perror("malloc");
+    return NULL;
 }
 
 
@@ -150,7 +150,7 @@ process_args(int argc, char **argv, const char **directory,
     NMH_UNUSED(suffix);
 #   endif /* ! HAVE_MKSTEMPS */
 
-    if (nmh_init(argv[0], 1)) { done(NOTOK); }
+    if (nmh_init(argv[0], 2)) { done(NOTOK); }
     arguments = getarguments (invo_name, argc, argv, 1);
     argp = arguments;