aboutsummaryrefslogtreecommitdiff
path: root/ld/ldmain.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2000-06-20 12:33:21 +0000
committerAlan Modra <amodra@gmail.com>2000-06-20 12:33:21 +0000
commit2ab47eed68c82a9a6d055ba3f49ca6a8a1dd2575 (patch)
treef16dbfc601991f71c0177a7027479b3d3e3f9247 /ld/ldmain.c
parentb305ef96a167be657a95d273db6945fe7597e937 (diff)
downloadgdb-2ab47eed68c82a9a6d055ba3f49ca6a8a1dd2575.zip
gdb-2ab47eed68c82a9a6d055ba3f49ca6a8a1dd2575.tar.gz
gdb-2ab47eed68c82a9a6d055ba3f49ca6a8a1dd2575.tar.bz2
Correct pointer comparisons relying on NULL less than any other pointer.
Alexander Aganichev's fix for ieee.c
Diffstat (limited to 'ld/ldmain.c')
-rw-r--r--ld/ldmain.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ld/ldmain.c b/ld/ldmain.c
index 9cb55ed..660ea94 100644
--- a/ld/ldmain.c
+++ b/ld/ldmain.c
@@ -575,7 +575,7 @@ set_scripts_dir ()
{
/* We could have \foo\bar, or /foo\bar. */
char *bslash = strrchr (program_name, '\\');
- if (bslash > end)
+ if (end == NULL || (bslash != NULL && bslash > end))
end = bslash;
}
#endif