mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-12 03:43:33 +08:00
2011-02-22 Michael Snyder <msnyder@vmware.com>
* cli/cli-utils.c (number_is_in_list): Check for zero return.
This commit is contained in:
parent
b7ea3126c0
commit
298f437a6b
@ -1,3 +1,7 @@
|
||||
2011-02-22 Michael Snyder <msnyder@vmware.com>
|
||||
|
||||
* cli/cli-utils.c (number_is_in_list): Check for zero return.
|
||||
|
||||
2011-02-22 Pedro Alves <pedro@codesourcery.com>
|
||||
|
||||
* frame-unwind.h: Fix comment to mention the this frame, not the
|
||||
|
@ -175,10 +175,15 @@ number_is_in_list (char *list, int number)
|
||||
if (list == NULL || *list == '\0')
|
||||
return 1;
|
||||
|
||||
while (list != NULL && *list != '\0')
|
||||
if (get_number_or_range (&list) == number)
|
||||
return 1;
|
||||
while (*list != '\0')
|
||||
{
|
||||
int gotnum = get_number_or_range (&list);
|
||||
|
||||
if (gotnum == 0)
|
||||
error (_("Args must be numbers or '$' variables."));
|
||||
if (gotnum == number)
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user