diff options
author | Doug Evans <xdje42@gmail.com> | 2014-09-08 20:47:57 -0700 |
---|---|---|
committer | Doug Evans <xdje42@gmail.com> | 2014-09-08 20:47:57 -0700 |
commit | d81412aa4b2669d108de0b4e1d8f881cedebd8a9 (patch) | |
tree | 01e5a9329bd3b1d70fd35e10c7b39ee4e44a08c0 /gdb/guile | |
parent | 4c122fc3154566369237c6194def4bd88a074f7e (diff) | |
download | gdb-d81412aa4b2669d108de0b4e1d8f881cedebd8a9.zip gdb-d81412aa4b2669d108de0b4e1d8f881cedebd8a9.tar.gz gdb-d81412aa4b2669d108de0b4e1d8f881cedebd8a9.tar.bz2 |
Replace use of magic number with named constant.
gdb/ChangeLog:
* guile/scm-cmd.c (gdbscm_parse_command_name): Replace magic number
with named constant. Fix style of pointer comparison.
* python/py-cmd.c (gdbpy_parse_command_name): Ditto.
Diffstat (limited to 'gdb/guile')
-rw-r--r-- | gdb/guile/scm-cmd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/guile/scm-cmd.c b/gdb/guile/scm-cmd.c index 54bed2c..2c4b2f8 100644 --- a/gdb/guile/scm-cmd.c +++ b/gdb/guile/scm-cmd.c @@ -531,7 +531,7 @@ gdbscm_parse_command_name (const char *name, prefix_text2 = prefix_text; elt = lookup_cmd_1 (&prefix_text2, *start_list, NULL, 1); - if (!elt || elt == (struct cmd_list_element *) -1) + if (elt == NULL || elt == CMD_LIST_AMBIGUOUS) { msg = xstrprintf (_("could not find command prefix '%s'"), prefix_text); xfree (prefix_text); |