The pointer ids is being redundantly null checked in a few places, ids has already been null checked in earlier return paths. Note that null checking on a free of null is also redundant since free won't attempt to free a null pointer.
Cleans up static analysis warning from cppcheck:
Checking pqos/alloc.c ...
pqos/alloc.c:482:44: style: Condition 'ids!=NULL' is always true [knownConditionTrueFalse]
if (res_ids == NULL && ids != NULL)
^
pqos/alloc.c:496:44: style: Condition 'ids!=NULL' is always true [knownConditionTrueFalse]
if (res_ids == NULL && ids != NULL)
^
pqos/alloc.c:508:36: style: Condition 'ids!=NULL' is always true [knownConditionTrueFalse]
if (res_ids == NULL && ids != NULL)
The pointer ids is being redundantly null checked in a few places, ids has already been null checked in earlier return paths. Note that null checking on a free of null is also redundant since free won't attempt to free a null pointer.
Cleans up static analysis warning from cppcheck: Checking pqos/alloc.c ... pqos/alloc.c:482:44: style: Condition 'ids!=NULL' is always true [knownConditionTrueFalse] if (res_ids == NULL && ids != NULL) ^ pqos/alloc.c:496:44: style: Condition 'ids!=NULL' is always true [knownConditionTrueFalse] if (res_ids == NULL && ids != NULL) ^ pqos/alloc.c:508:36: style: Condition 'ids!=NULL' is always true [knownConditionTrueFalse] if (res_ids == NULL && ids != NULL)
Signed-off-by: Colin Ian King colin.i.king@gmail.com
Description
Affected parts
Motivation and Context
How Has This Been Tested?
Types of changes
Checklist: