PR binutils/4987

* resrc.c: (read_rc_file): Move 'filename' default initialization to start of function.
This commit is contained in:
Nick Clifton
2007-09-17 09:58:27 +00:00
parent 61d7672abe
commit a103980969
3 changed files with 94 additions and 6 deletions

View File

@@ -436,8 +436,10 @@ read_rc_file (const char *filename, const char *preprocessor,
char *cmd;
const char *fnquotes = (filename_need_quotes (filename) ? "\"" : "");
if (filename == NULL)
filename = "-";
/* Setup the default resource import path taken from input file. */
if (strchr (filename, '/') != NULL || strchr (filename, '\\') != NULL)
else if (strchr (filename, '/') != NULL || strchr (filename, '\\') != NULL)
{
char *e, *c;
@@ -469,8 +471,6 @@ read_rc_file (const char *filename, const char *preprocessor,
if (preprocargs == NULL)
preprocargs = "";
if (filename == NULL)
filename = "-";
if (preprocessor)
{