diff options
author | Nick Clifton <nickc@redhat.com> | 2007-09-17 09:58:27 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2007-09-17 09:58:27 +0000 |
commit | a10398096925915e0e1b3930d9b630ddbf1e1018 (patch) | |
tree | 4c12bf3b104039fbaf5e6208988a4bcc85bfc7b2 /binutils/resrc.c | |
parent | 61d7672abe61cce00d230cb6db196c424df81ab2 (diff) | |
download | fsf-binutils-gdb-a10398096925915e0e1b3930d9b630ddbf1e1018.zip fsf-binutils-gdb-a10398096925915e0e1b3930d9b630ddbf1e1018.tar.gz fsf-binutils-gdb-a10398096925915e0e1b3930d9b630ddbf1e1018.tar.bz2 |
PR binutils/4987
* resrc.c: (read_rc_file): Move 'filename' default initialization to start of function.
Diffstat (limited to 'binutils/resrc.c')
-rw-r--r-- | binutils/resrc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/binutils/resrc.c b/binutils/resrc.c index 65357fe..a621319 100644 --- a/binutils/resrc.c +++ b/binutils/resrc.c @@ -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) { |