mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-09-10 03:42:22 +08:00
Correct pointer comparisons relying on NULL less than any other pointer.
Alexander Aganichev's fix for ieee.c
This commit is contained in:
@ -1,3 +1,8 @@
|
||||
2000-06-20 Alan Modra <alan@linuxcare.com.au>
|
||||
|
||||
* source.c (annotate_source): Correct pointer comparison when
|
||||
checking for backslashes.
|
||||
|
||||
2000-06-13 H.J. Lu <hjl@gnu.org>
|
||||
|
||||
* configure: Regenerate.
|
||||
|
@ -116,7 +116,7 @@ DEFUN (annotate_source, (sf, max_width, annote, arg),
|
||||
#ifdef HAVE_DOS_BASED_FILE_SYSTEM
|
||||
{
|
||||
char *bslash = strrchr (sf->name, '\\');
|
||||
if (bslash > name_only)
|
||||
if (name_only == NULL || (bslash != NULL && bslash > name_only))
|
||||
name_only = bslash;
|
||||
if (name_only == NULL && sf->name[0] != '\0' && sf->name[1] == ':')
|
||||
name_only = (char *)sf->name + 1;
|
||||
@ -174,7 +174,7 @@ DEFUN (annotate_source, (sf, max_width, annote, arg),
|
||||
#ifdef HAVE_DOS_BASED_FILE_SYSTEM
|
||||
{
|
||||
char *bslash = strrchr (sf->name, '\\');
|
||||
if (bslash > filename)
|
||||
if (filename == NULL || (bslash != NULL && bslash > filename))
|
||||
filename = bslash;
|
||||
if (filename == NULL && sf->name[0] != '\0' && sf->name[1] == ':')
|
||||
filename = sf->name + 1;
|
||||
|
Reference in New Issue
Block a user