Add some more casts (2/2)
[deliverable/binutils-gdb.git] / gdb / mi / mi-cmds.c
index 496a8aa948440f5e70ce33c590e7805e08676189..2d8af2fed354f9d1c91cced036e3169b7d66e9e1 100644 (file)
@@ -1,5 +1,5 @@
 /* MI Command Set for GDB, the GNU debugger.
-   Copyright (C) 2000-2013 Free Software Foundation, Inc.
+   Copyright (C) 2000-2015 Free Software Foundation, Inc.
 
    Contributed by Cygnus Solutions (a Red Hat company).
 
@@ -21,7 +21,6 @@
 #include "defs.h"
 #include "top.h"
 #include "mi-cmds.h"
-#include "gdb_string.h"
 #include "mi-main.h"
 
 extern void _initialize_mi_cmds (void);
@@ -125,6 +124,7 @@ static struct mi_cmd mi_cmds[] =
   DEF_MI_CMD_MI ("inferior-tty-set", mi_cmd_inferior_tty_set),
   DEF_MI_CMD_MI ("inferior-tty-show", mi_cmd_inferior_tty_show),
   DEF_MI_CMD_MI ("info-ada-exceptions", mi_cmd_info_ada_exceptions),
+  DEF_MI_CMD_MI ("info-gdb-mi-command", mi_cmd_info_gdb_mi_command),
   DEF_MI_CMD_MI ("info-os", mi_cmd_info_os),
   DEF_MI_CMD_MI ("interpreter-exec", mi_cmd_interpreter_exec),
   DEF_MI_CMD_MI ("list-features", mi_cmd_list_features),
@@ -246,10 +246,8 @@ build_table (struct mi_cmd *commands)
   int nr_rehash = 0;
   int nr_entries = 0;
   struct mi_cmd *command;
-  int sizeof_table = sizeof (struct mi_cmd **) * MI_TABLE_SIZE;
 
-  mi_table = xmalloc (sizeof_table);
-  memset (mi_table, 0, sizeof_table);
+  mi_table = XCNEWVEC (struct mi_cmd *, MI_TABLE_SIZE);
   for (command = commands; command->name != 0; command++)
     {
       struct mi_cmd **entry = lookup_table (command->name);
This page took 0.030798 seconds and 4 git commands to generate.