]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - gdb/xml-syscall.c
Add casts to memory allocation related calls
[thirdparty/binutils-gdb.git] / gdb / xml-syscall.c
index ea85a2c419970110f9888917b9808206204dc4d3..255d8164bed899a79dbd58de5f29cb7952a87d53 100644 (file)
@@ -376,7 +376,7 @@ xml_list_of_syscalls (struct gdbarch *gdbarch)
     return NULL;
 
   nsyscalls = VEC_length (syscall_desc_p, syscalls_info->syscalls);
-  names = xmalloc ((nsyscalls + 1) * sizeof (char *));
+  names = XNEWVEC (const char *, nsyscalls + 1);
 
   for (i = 0;
        VEC_iterate (syscall_desc_p, syscalls_info->syscalls, i, sysdesc);