aboutsummaryrefslogtreecommitdiff
path: root/binutils/ieee.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 /binutils/ieee.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 '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 27409cc..44dd64f 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)