networkd: add an assert
This error should never happen, so replace the check with an assert. The check was anyway broken due to an uninitialized return value. Reported by Thomas Hindoe Paaboel Andersen <phomes@gmail.com>.
This commit is contained in:
parent
50d6810ea8
commit
702807365e
|
@ -1518,8 +1518,7 @@ int link_save(Link *link) {
|
|||
assert(link->state_file);
|
||||
|
||||
state = link_state_to_string(link->state);
|
||||
if (!state)
|
||||
goto finish;
|
||||
assert(state);
|
||||
|
||||
r = fopen_temporary(link->state_file, &f, &temp_path);
|
||||
if (r < 0)
|
||||
|
|
Loading…
Reference in a new issue