summaryrefslogtreecommitdiff
path: root/binutils/bucomm.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@bigpond.net.au>2000-06-20 12:33:21 +0000
committerAlan Modra <amodra@bigpond.net.au>2000-06-20 12:33:21 +0000
commitf7eb464f9dc41648b8a6573fcb8ce1703c1d13c4 (patch)
tree9d72fe6addf3dfdba6beefbf014d469a215cada4 /binutils/bucomm.c
parent7872f9e515aff735a2d897a63ee2564a94f22cd3 (diff)
downloadbinutils-redhat-f7eb464f9dc41648b8a6573fcb8ce1703c1d13c4.tar.gz
Correct pointer comparisons relying on NULL less than any other pointer.
Alexander Aganichev's fix for ieee.c
Diffstat (limited to 'binutils/bucomm.c')
-rw-r--r--binutils/bucomm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/binutils/bucomm.c b/binutils/bucomm.c
index 76ffa60a17..86c327fd43 100644
--- a/binutils/bucomm.c
+++ b/binutils/bucomm.c
@@ -219,7 +219,7 @@ make_tempname (filename)
{
/* We could have foo/bar\\baz, or foo\\bar, or d:bar. */
char *bslash = strrchr (filename, '\\');
- if (bslash > slash)
+ if (slash == NULL || (bslash != NULL && bslash > slash))
slash = bslash;
if (slash == NULL && filename[0] != '\0' && filename[1] == ':')
slash = filename + 1;