rest_api: strtoul canot return negative
>>> CID 307538: Control flow issues (NO_EFFECT) >>> This less-than-zero comparison of an unsigned value is never true. "map_id < 0UL". Closes: CID#307538 Change-Id: Ic5019e216dd7b26be0bd988df218a2cb5775e411
This commit is contained in:
parent
99ea365ce7
commit
2d5d4c3bee
|
@ -410,7 +410,7 @@ static int api_cb_slotmaps_del(const struct _u_request *req, struct _u_response
|
|||
goto err;
|
||||
}
|
||||
map_id = strtoul(slotmap_id_str, NULL, 10);
|
||||
if (map_id < 0) {
|
||||
if (map_id == ULONG_MAX && errno != 0) {
|
||||
status = 400;
|
||||
goto err;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue