summaryrefslogtreecommitdiff
path: root/networking/ifupdown.c
diff options
context:
space:
mode:
Diffstat (limited to 'networking/ifupdown.c')
-rw-r--r--networking/ifupdown.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/networking/ifupdown.c b/networking/ifupdown.c
index 9c2cad2..73da260 100644
--- a/networking/ifupdown.c
+++ b/networking/ifupdown.c
@@ -1312,8 +1312,8 @@ int ifupdown_main(int argc UNUSED_PARAM, char **argv)
llist_t *iface_state = find_iface_state(state_list, iface);
if (cmds == iface_up && !any_failures) {
- char * const newiface = xasprintf("%s=%s", iface, liface);
- if (iface_state == NULL) {
+ char *newiface = xasprintf("%s=%s", iface, liface);
+ if (!iface_state) {
llist_add_to_end(&state_list, newiface);
} else {
free(iface_state->data);