1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-08 21:18:16 +03:00

libcli: simplify an if condition

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
Ralph Boehme 2020-01-21 11:56:18 +01:00 committed by Jeremy Allison
parent b7e77ce32d
commit 0b9ddce90c

View File

@ -70,7 +70,10 @@ void security_token_debug(int dbg_class, int dbg_lev, const struct security_toke
bool security_token_is_sid(const struct security_token *token, const struct dom_sid *sid)
{
if (token->sids && dom_sid_equal(&token->sids[PRIMARY_USER_SID_INDEX], sid)) {
if (token->sids == NULL) {
return false;
}
if (dom_sid_equal(&token->sids[PRIMARY_USER_SID_INDEX], sid)) {
return true;
}
return false;