1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-03 13:47:25 +03:00

winbindd: collapse two if expressions

No change in behaviour.

After calling set_domain_offline() domain->offline will be set to false, iow
everytime

  if (!domain->internal && was_online)

is true,

  if (!domain->internal &&
      !domain->online &&
      was_online)

will also true, so we can drop the second if expression.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
This commit is contained in:
Ralph Boehme 2024-02-16 16:19:34 +01:00 committed by Stefan Metzmacher
parent 6baf9547e5
commit cbd4aee50b

View File

@ -1842,14 +1842,13 @@ NTSTATUS wb_cache_name_to_sid(struct winbindd_domain *domain,
NT_STATUS_EQUAL(status, NT_STATUS_DOMAIN_CONTROLLER_NOT_FOUND))
{
if (!domain->internal && was_online) {
/* Set the domain offline and query the cache again */
set_domain_offline(domain);
}
if (!domain->internal &&
!domain->online &&
was_online) {
NTSTATUS cache_status;
cache_status = wcache_name_to_sid(domain, domain_name, name, sid, type);
return cache_status;
return wcache_name_to_sid(domain,
domain_name,
name,
sid,
type);
}
}
/* and save it */