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
@@ -139,7 +139,7 @@ RESULT versaloon_add_want_pos(uint16_t offset, uint16_t size, uint8_t *buff)
|
||||
{
|
||||
struct versaloon_want_pos_t *new_pos = NULL;
|
||||
|
||||
new_pos = (struct versaloon_want_pos_t *)malloc(sizeof(*new_pos));
|
||||
new_pos = malloc(sizeof(*new_pos));
|
||||
if (NULL == new_pos) {
|
||||
LOG_ERROR(ERRMSG_NOT_ENOUGH_MEMORY);
|
||||
return ERRCODE_NOT_ENOUGH_MEMORY;
|
||||
|
||||
Reference in New Issue
Block a user