diff options
author | Tom Gundersen <teg@jklm.no> | 2014-04-11 23:57:18 +0200 |
---|---|---|
committer | Tom Gundersen <teg@jklm.no> | 2014-04-11 23:57:18 +0200 |
commit | 702807365ee63f0929858ea26eeea593df4e51da (patch) | |
tree | bf7b71e8d4bf0abd977a2ff24152876a9f81036a /src/network/networkd-link.c | |
parent | 50d6810ea8117bbfcf7007ae779d1a98a7300b5f (diff) |
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>.
Diffstat (limited to 'src/network/networkd-link.c')
-rw-r--r-- | src/network/networkd-link.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c index 684e1e5d3d..31b4befd72 100644 --- a/src/network/networkd-link.c +++ b/src/network/networkd-link.c @@ -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) |