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:
805d148
)
systemctl: properly iterate through service array when dispatching to sysv
author
Lennart Poettering
<lennart@poettering.net>
Mon, 5 Jan 2015 00:56:47 +0000
(
01:56
+0100)
committer
Lennart Poettering
<lennart@poettering.net>
Mon, 5 Jan 2015 00:56:47 +0000
(
01:56
+0100)
https://bugzilla.redhat.com/show_bug.cgi?id=1175734
src/systemctl/systemctl.c
patch
|
blob
|
history
diff --git
a/src/systemctl/systemctl.c
b/src/systemctl/systemctl.c
index
9c4b9ed
..
3d939f0
100644
(file)
--- a/
src/systemctl/systemctl.c
+++ b/
src/systemctl/systemctl.c
@@
-5188,8
+5188,10
@@
static int enable_sysv_units(const char *verb, char **args) {
return -EPROTO;
/* Remove this entry, so that we don't try enabling it as native unit */
- assert(f > 0 && streq(args[f-1], name));
- assert_se(strv_remove(args + f - 1, name));
+ assert(f > 0);
+ f--;
+ assert(args[f] == name);
+ strv_remove(args, name);
}
#endif