mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
cleanup: Avoid creating invalid enum values.
Enums should be fairly strong type guarantees about the possible value range. The API says the return value is unspecified, so this is not a breaking change.
This commit is contained in:
parent
cad7cf8344
commit
50b0ec824f
|
@ -1380,7 +1380,7 @@ Tox_User_Status tox_friend_get_status(const Tox *tox, uint32_t friend_number, To
|
|||
|
||||
if (ret == USERSTATUS_INVALID) {
|
||||
SET_ERROR_PARAMETER(error, TOX_ERR_FRIEND_QUERY_FRIEND_NOT_FOUND);
|
||||
return (Tox_User_Status)(TOX_USER_STATUS_BUSY + 1);
|
||||
return TOX_USER_STATUS_NONE;
|
||||
}
|
||||
|
||||
SET_ERROR_PARAMETER(error, TOX_ERR_FRIEND_QUERY_OK);
|
||||
|
|
Loading…
Reference in New Issue
Block a user