aboutsummaryrefslogtreecommitdiff
path: root/gdb/location.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2016-09-30 15:43:40 -0600
committerTom Tromey <tom@tromey.com>2016-10-05 10:31:34 -0600
commite742d386c480efa5229bc8b1887a7718f840a457 (patch)
tree682a971c8b8b2dbba575290ed55eec133c9a8aaa /gdb/location.c
parent3e611445bf05fa20e0befa41afa42651d1983734 (diff)
downloadbinutils-e742d386c480efa5229bc8b1887a7718f840a457.zip
binutils-e742d386c480efa5229bc8b1887a7718f840a457.tar.gz
binutils-e742d386c480efa5229bc8b1887a7718f840a457.tar.bz2
PR gdb/20653 - small cleanup in string_to_explicit_location
This bug points out that string_to_explicit_location compares a char* against '\0'; whereas comparing against NULL is more normal. 2016-10-05 Tom Tromey <tom@tromey.com> PR breakpoints/20653: * location.c (string_to_explicit_location): Use NULL, not '\0'.
Diffstat (limited to 'gdb/location.c')
-rw-r--r--gdb/location.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/location.c b/gdb/location.c
index 65116c7..8dce21a 100644
--- a/gdb/location.c
+++ b/gdb/location.c
@@ -524,7 +524,7 @@ string_to_explicit_location (const char **argp,
character is an explicit location. "-p" is reserved, though,
for probe locations. */
if (argp == NULL
- || *argp == '\0'
+ || *argp == NULL
|| *argp[0] != '-'
|| !isalpha ((*argp)[1])
|| ((*argp)[0] == '-' && (*argp)[1] == 'p'))