mirror of
https://github.com/systemd/systemd
synced 2024-10-01 13:55:20 +00:00
strv: replace always-true condition with assertion
Follow-up for aca093018c
.
Fixes CID#1547105.
This commit is contained in:
parent
07748c53df
commit
f2d2aa0934
|
@ -1053,7 +1053,8 @@ int strv_rebreak_lines(char **l, size_t width, char ***ret) {
|
|||
}
|
||||
}
|
||||
|
||||
if (start) { /* Process rest of the line */
|
||||
/* Process rest of the line */
|
||||
assert(start);
|
||||
if (in_prefix) /* Never seen anything non-whitespace? Generate empty line! */
|
||||
r = strv_extend(&broken, "");
|
||||
else if (whitespace_begin && !whitespace_end) { /* Ends in whitespace? Chop it off! */
|
||||
|
@ -1067,7 +1068,6 @@ int strv_rebreak_lines(char **l, size_t width, char ***ret) {
|
|||
if (r < 0)
|
||||
return r;
|
||||
}
|
||||
}
|
||||
|
||||
*ret = TAKE_PTR(broken);
|
||||
return 0;
|
||||
|
|
Loading…
Reference in a new issue