From: Tom Tromey Date: Wed, 22 Aug 2012 14:24:05 +0000 (+0000) Subject: * cli/cli-cmds.c (filter_sals): Handle nelts == 0 case. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2f2e97fabcc53e4f842e076613b8987b53fe2e1e;p=binutils-gdb.git * cli/cli-cmds.c (filter_sals): Handle nelts == 0 case. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index bef6d8cbf28..7dcdbedf497 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2012-08-22 Tom Tromey + + * cli/cli-cmds.c (filter_sals): Handle nelts == 0 case. + 2012-08-21 Pierre Muller * symfile.c (allocate_symtab): Use host_address_to_string diff --git a/gdb/cli/cli-cmds.c b/gdb/cli/cli-cmds.c index 2a808034027..5d8a124ab26 100644 --- a/gdb/cli/cli-cmds.c +++ b/gdb/cli/cli-cmds.c @@ -1534,13 +1534,14 @@ filter_sals (struct symtabs_and_lines *sals) ++out; } } - sals->nelts = out; if (sals->nelts == 0) { xfree (sals->sals); sals->sals = NULL; } + else + sals->nelts = out; } static void