gdb/cli: Remove casts of NULL during assignment.

In the following code:

    struct symbol *wsym = (struct symbol *) NULL;

the cast of NULL is redundant, it adds noise, and is just one more thing
to change if the type of wsym ever changes.  There are a relatively
small number of places in gdb where the above code pattern is used.
Usually the cast is removed like this:

    struct symbol *wsym = NULL;

This commit updates all the places within the gdb/cli directory where we
cast NULL during assignment, removing the cast.

gdb/ChangeLog:

	* cli/cli-decode.c (find_cmd): Remove cast of NULL pointer.
This commit is contained in:
Andrew Burgess 2015-08-31 21:25:37 +01:00
parent be90335825
commit b03e6ad9cd
2 changed files with 5 additions and 1 deletions

View File

@ -1,3 +1,7 @@
2015-09-04 Andrew Burgess <andrew.burgess@embecosm.com>
* cli/cli-decode.c (find_cmd): Remove cast of NULL pointer.
2015-09-04 Andrew Burgess <andrew.burgess@embecosm.com>
* c-valprint.c (print_unpacked_pointer): Remove cast of NULL

View File

@ -1219,7 +1219,7 @@ find_cmd (const char *command, int len, struct cmd_list_element *clist,
{
struct cmd_list_element *found, *c;
found = (struct cmd_list_element *) NULL;
found = NULL;
*nfound = 0;
for (c = clist; c; c = c->next)
if (!strncmp (command, c->name, len)