Browse Source

remove redundant variable `has_smk'

rlar 15 years ago
parent
commit
56943212f1
  1. 4
      ChangeLog
  2. 8
      src/main.c

4
ChangeLog

@ -1,3 +1,7 @@
2011-07-02 Robert Larice
* src/main.c :
remove redundant variable `has_smk'
2011-07-02 Robert Larice
* src/main.c :
print_news()

8
src/main.c

@ -1147,7 +1147,6 @@ bot:
#if defined(HAS_WINDOWS) || defined(_MSC_VER) || defined(__MINGW32__)
char *tpf = NULL; /* temporary file */
char *dname = NULL; /* input file*/
bool has_smk = FALSE;
#endif
tempfile = tmpfile();
/* tmpfile() returns NULL, if in MS Windows as non admin user
@ -1160,7 +1159,6 @@ bot:
fprintf(stderr, "Could not open a temporary file to save and use optional arguments.");
sp_shutdown(EXIT_BAD);
}
has_smk = TRUE;
}
#endif
@ -1224,10 +1222,8 @@ bot:
gotone = TRUE;
}
#if defined(HAS_WINDOWS) || defined(_MSC_VER) || defined(__MINGW32__)
if (tempfile && has_smk) {
if (remove(tpf))
perror("Could not delete temp file");
}
if (tempfile && tpf && remove(tpf))
perror("Could not delete temp file");
#endif
if (ft_batchmode && err) {
sp_shutdown(EXIT_BAD);

Loading…
Cancel
Save