gdb: Use NULL instead of 0 for pointer comparison.
Small code cleanup, use NULL instead of 0 when checking pointers. There should be no user visible changes after this commit. gdb/ChangeLog: * cli/cli-cmds.c (list_command): Use NULL instead of 0 when checking pointers.
This commit is contained in:
parent
f43f85715a
commit
8c05462adb
|
@ -1,3 +1,8 @@
|
||||||
|
2015-12-11 Andrew Burgess <andrew.burgess@embecosm.com>
|
||||||
|
|
||||||
|
* cli/cli-cmds.c (list_command): Use NULL instead of 0 when
|
||||||
|
checking pointers.
|
||||||
|
|
||||||
2015-12-11 Andrew Burgess <andrew.burgess@embecosm.com>
|
2015-12-11 Andrew Burgess <andrew.burgess@embecosm.com>
|
||||||
|
|
||||||
* source.c (lines_to_list): Make static.
|
* source.c (lines_to_list): Make static.
|
||||||
|
|
|
@ -907,7 +907,7 @@ list_command (char *arg, int from_tty)
|
||||||
cleanup = make_cleanup (null_cleanup, NULL);
|
cleanup = make_cleanup (null_cleanup, NULL);
|
||||||
|
|
||||||
/* Pull in the current default source line if necessary. */
|
/* Pull in the current default source line if necessary. */
|
||||||
if (arg == 0 || arg[0] == '+' || arg[0] == '-')
|
if (arg == NULL || arg[0] == '+' || arg[0] == '-')
|
||||||
{
|
{
|
||||||
set_default_source_symtab_and_line ();
|
set_default_source_symtab_and_line ();
|
||||||
cursal = get_current_source_symtab_and_line ();
|
cursal = get_current_source_symtab_and_line ();
|
||||||
|
@ -936,7 +936,7 @@ list_command (char *arg, int from_tty)
|
||||||
|
|
||||||
/* "l" or "l +" lists next ten lines. */
|
/* "l" or "l +" lists next ten lines. */
|
||||||
|
|
||||||
if (arg == 0 || strcmp (arg, "+") == 0)
|
if (arg == NULL || strcmp (arg, "+") == 0)
|
||||||
{
|
{
|
||||||
print_source_lines (cursal.symtab, cursal.line,
|
print_source_lines (cursal.symtab, cursal.line,
|
||||||
cursal.line + get_lines_to_list (), 0);
|
cursal.line + get_lines_to_list (), 0);
|
||||||
|
|
Loading…
Reference in New Issue