summaryrefslogtreecommitdiff
path: root/binutils/ieee.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/ieee.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/ieee.c')
-rw-r--r--binutils/ieee.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/binutils/ieee.c b/binutils/ieee.c
index 27409cc9ae..44dd64fbb0 100644
--- a/binutils/ieee.c
+++ b/binutils/ieee.c
@@ -4940,8 +4940,8 @@ ieee_start_compilation_unit (p, filename)
info->filename = filename;
modname = strrchr (filename, '/');
/* We could have a mixed forward/back slash case. */
- backslash = strrchr (modname, '\\');
- if (backslash > modname)
+ backslash = strrchr (filename, '\\');
+ if (modname == NULL || (backslash != NULL && backslash > modname))
modname = backslash;
if (modname != NULL)
@@ -5206,8 +5206,8 @@ ieee_add_bb11 (info, sec, low, high)
/* Start the enclosing BB10 block. */
filename = bfd_get_filename (info->abfd);
modname = strrchr (filename, '/');
- backslash = strrchr (modname, '\\');
- if (backslash > modname)
+ backslash = strrchr (filename, '\\');
+ if (modname == NULL || (backslash != NULL && backslash > modname))
modname = backslash;
if (modname != NULL)