network: improve readability of config_parse_ifalias()

This commit is contained in:
Yu Watanabe
2018-11-04 00:31:46 +09:00
parent 25ed70f76f
commit 44386b449b
+3 -4
View File
@@ -255,11 +255,10 @@ int config_parse_ifalias(const char *unit,
return 0;
}
free(*s);
if (*n)
*s = TAKE_PTR(n);
if (isempty(n))
*s = mfree(*s);
else
*s = NULL;
free_and_replace(*s, n);
return 0;
}