]> diplodocus.org Git - nmh/blobdiff - uip/prompter.c
Hard-code the config/version.c target, instead of using $@, so its
[nmh] / uip / prompter.c
index 05f8348cfa91f4f2ef2aabb7ff2112c326460364..afa81f5f15c10f0972979864d1bf1c5e9ca17489 100644 (file)
@@ -72,10 +72,10 @@ main (int argc, char **argv)
     int doteof = 0, fdi, fdo, i, state;
     char *cp, *drft = NULL, *erasep = NULL;
     char *killp = NULL, name[NAMESZ], field[BUFSIZ];
     int doteof = 0, fdi, fdo, i, state;
     char *cp, *drft = NULL, *erasep = NULL;
     char *killp = NULL, name[NAMESZ], field[BUFSIZ];
-    char buffer[BUFSIZ], tmpfil[BUFSIZ];
+    char buffer[BUFSIZ];
     char **arguments, **argp;
     FILE *in, *out;
     char **arguments, **argp;
     FILE *in, *out;
-    char *tfile = NULL;
+    char *tmpfil;
     m_getfld_state_t gstate = 0;
 
 #ifdef LOCALE
     m_getfld_state_t gstate = 0;
 
 #ifdef LOCALE
@@ -154,10 +154,9 @@ main (int argc, char **argv)
     if ((in = fopen (drft, "r")) == NULL)
        adios (drft, "unable to open");
 
     if ((in = fopen (drft, "r")) == NULL)
        adios (drft, "unable to open");
 
-    tfile = m_mktemp2(NULL, invo_name, NULL, &out);
-    if (tfile == NULL) adios("prompter", "unable to create temporary file");
+    tmpfil = m_mktemp2(NULL, invo_name, NULL, &out);
+    if (tmpfil == NULL) adios("prompter", "unable to create temporary file");
     chmod (tmpfil, 0600);
     chmod (tmpfil, 0600);
-    strncpy (tmpfil, tfile, sizeof(tmpfil));
 
     /*
      * Are we changing the kill or erase character?
 
     /*
      * Are we changing the kill or erase character?