aboutsummaryrefslogtreecommitdiff
path: root/ld
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
parentb305ef96a167be657a95d273db6945fe7597e937 (diff)
downloadfsf-binutils-gdb-2ab47eed68c82a9a6d055ba3f49ca6a8a1dd2575.zip
fsf-binutils-gdb-2ab47eed68c82a9a6d055ba3f49ca6a8a1dd2575.tar.gz
fsf-binutils-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')
-rw-r--r--ld/ChangeLog5
-rw-r--r--ld/ldmain.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index 130c8dd..cc5df52 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,8 @@
+2000-06-20 Alan Modra <alan@linuxcare.com.au>
+
+ * ldmain.c (set_scripts_dir): Correct pointer comparison when
+ checking for backslashes.
+
2000-06-19 Alan Modra <alan@linuxcare.com.au>
* NEWS: Move entries not in 2.10 above "Changes in version 2.10".
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