remove redundant variable `has_smk'

This commit is contained in:
rlar 2011-07-02 10:23:54 +00:00
parent 1b0e1730d3
commit 56943212f1
2 changed files with 6 additions and 6 deletions

View File

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

View File

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