This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[commit] delete unnecessary init of *list variables
- From: Doug Evans <dje at google dot com>
- To: gdb-patches at sourceware dot org
- Date: Wed, 17 Jul 2013 13:30:39 -0700
- Subject: [commit] delete unnecessary init of *list variables
Hi.
There's no need to initialize these variables.
Plus when adding new prefix commands one can be left wondering
if one needs to update this function.
This patch removes the issue and simplifies the code.
Committed.
2013-07-17 Doug Evans <dje@google.com>
* cli/cli-cmds.c (init_cmd_lists): Delete unnecessary initialization
of all *list variables.
Index: cli/cli-cmds.c
===================================================================
RCS file: /cvs/src/src/gdb/cli/cli-cmds.c,v
retrieving revision 1.158
diff -u -p -r1.158 cli-cmds.c
--- cli/cli-cmds.c 17 Jul 2013 19:01:48 -0000 1.158
+++ cli/cli-cmds.c 17 Jul 2013 19:49:24 -0000
@@ -1558,27 +1558,6 @@ void
init_cmd_lists (void)
{
max_user_call_depth = 1024;
-
- cmdlist = NULL;
- infolist = NULL;
- enablelist = NULL;
- disablelist = NULL;
- stoplist = NULL;
- deletelist = NULL;
- detachlist = NULL;
- setlist = NULL;
- unsetlist = NULL;
- showlist = NULL;
- sethistlist = NULL;
- showhistlist = NULL;
- unsethistlist = NULL;
- maintenancelist = NULL;
- maintenanceinfolist = NULL;
- maintenanceprintlist = NULL;
- setprintlist = NULL;
- showprintlist = NULL;
- setchecklist = NULL;
- showchecklist = NULL;
}
static void