projects
/
platform
/
upstream
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
50d6810
)
networkd: add an assert
author
Tom Gundersen
<teg@jklm.no>
Fri, 11 Apr 2014 21:57:18 +0000
(23:57 +0200)
committer
Tom Gundersen
<teg@jklm.no>
Fri, 11 Apr 2014 21:57:18 +0000
(23:57 +0200)
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>.
src/network/networkd-link.c
patch
|
blob
|
history
diff --git
a/src/network/networkd-link.c
b/src/network/networkd-link.c
index
684e1e5
..
31b4bef
100644
(file)
--- 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)