aboutsummaryrefslogtreecommitdiff
path: root/gdb/cli/cli-decode.c
diff options
context:
space:
mode:
authorAndrew Burgess <andrew.burgess@embecosm.com>2015-08-31 21:25:37 +0100
committerAndrew Burgess <andrew.burgess@embecosm.com>2015-09-04 16:50:20 +0100
commitb03e6ad9cd2064214c0fbff179c7e47c855315e3 (patch)
tree37e637541c25246cdf8b8a650939560a340a642d /gdb/cli/cli-decode.c
parentbe9033582599e50521feb879d7476756c2c8c017 (diff)
downloadgdb-b03e6ad9cd2064214c0fbff179c7e47c855315e3.zip
gdb-b03e6ad9cd2064214c0fbff179c7e47c855315e3.tar.gz
gdb-b03e6ad9cd2064214c0fbff179c7e47c855315e3.tar.bz2
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.
Diffstat (limited to 'gdb/cli/cli-decode.c')
-rw-r--r--gdb/cli/cli-decode.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/cli/cli-decode.c b/gdb/cli/cli-decode.c
index f5b6fc4..cab2336 100644
--- a/gdb/cli/cli-decode.c
+++ b/gdb/cli/cli-decode.c
@@ -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)