git.samba.org
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
280e919
)
lib: Slightly simplify add_interface()
author
Volker Lendecke
<vl@samba.org>
Mon, 21 Mar 2022 08:12:02 +0000
(09:12 +0100)
committer
Jeremy Allison
<jra@samba.org>
Wed, 23 Mar 2022 16:57:28 +0000
(16:57 +0000)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source4/lib/socket/interface.c
patch
|
blob
|
history
diff --git
a/source4/lib/socket/interface.c
b/source4/lib/socket/interface.c
index 181893a9e7fcbad8e95b20ff4a0b500b59f169bd..b2dbf2261037df90bf80cb3bd969ba67dc394da6 100644
(file)
--- a/
source4/lib/socket/interface.c
+++ b/
source4/lib/socket/interface.c
@@
-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;