Don't cast return value of [cm]alloc
Change-Id: I0028a5b6757b1ba00031893d9a2a1725f915a0d5 Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/2069 Tested-by: jenkins Reviewed-by: Jörg Wunsch <openocd@uriah.heep.sax.de> Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
This commit is contained in:
committed by
Paul Fertser
parent
1171f07836
commit
e6907e6d7e
@@ -206,7 +206,7 @@ COMMAND_HELPER(transport_list_parse, char ***vector)
|
||||
return ERROR_COMMAND_SYNTAX_ERROR;
|
||||
|
||||
/* our return vector must be NULL terminated */
|
||||
argv = (char **) calloc(n + 1, sizeof(char *));
|
||||
argv = calloc(n + 1, sizeof(char *));
|
||||
if (argv == NULL)
|
||||
return ERROR_FAIL;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user