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
@@ -591,7 +591,7 @@ int arm11_run_instr_data_to_core_noack_inner_default(struct jtag_tap *tap,
|
||||
unsigned readiesNum = count;
|
||||
unsigned bytes = sizeof(*Readies)*readiesNum;
|
||||
|
||||
Readies = (uint8_t *) malloc(bytes);
|
||||
Readies = malloc(bytes);
|
||||
if (Readies == NULL) {
|
||||
LOG_ERROR("Out of memory allocating %u bytes", bytes);
|
||||
return ERROR_FAIL;
|
||||
|
||||
Reference in New Issue
Block a user