Add some more casts (2/2)
[deliverable/binutils-gdb.git] / gdb / mi / mi-cmds.c
index 87a536faf11775a1cbb6584ef781536024ab9d20..2d8af2fed354f9d1c91cced036e3169b7d66e9e1 100644 (file)
@@ -1,5 +1,5 @@
 /* MI Command Set for GDB, the GNU debugger.
-   Copyright (C) 2000-2014 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 <string.h>
 #include "mi-main.h"
 
 extern void _initialize_mi_cmds (void);
@@ -247,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.027786 seconds and 4 git commands to generate.