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

lib: Slightly simplify add_interface()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
Volker Lendecke 2022-03-21 09:12:02 +01:00 committed by Jeremy Allison
parent 280e9191cb
commit 313d207d72

View File

@ -94,7 +94,11 @@ static void add_interface(TALLOC_CTX *mem_ctx, const struct iface_struct *ifs, s
return;
}
iface = talloc(*interfaces == NULL ? mem_ctx : *interfaces, struct interface);
if (*interfaces != NULL) {
mem_ctx = *interfaces;
}
iface = talloc(mem_ctx, struct interface);
if (iface == NULL)
return;