From d81412aa4b2669d108de0b4e1d8f881cedebd8a9 Mon Sep 17 00:00:00 2001 From: Doug Evans Date: Mon, 8 Sep 2014 20:47:57 -0700 Subject: 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. --- gdb/python/py-cmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gdb/python') diff --git a/gdb/python/py-cmd.c b/gdb/python/py-cmd.c index 8bc4bf7..45af66b 100644 --- a/gdb/python/py-cmd.c +++ b/gdb/python/py-cmd.c @@ -487,7 +487,7 @@ gdbpy_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) { PyErr_Format (PyExc_RuntimeError, _("Could not find command prefix %s."), prefix_text); -- cgit v1.1