Fix minor bug in optimizing of argument parsing. Based on report from jakemus on freshmeat.

This commit is contained in:
Petter Reinholdtsen 2009-11-14 21:12:00 +00:00
parent 483db5bc72
commit 8caa4e87f5
2 changed files with 4 additions and 1 deletions

View File

@ -5,6 +5,8 @@ sysvinit (2.88dsf) UNRELEASED; urgency=low
from Bill Nottingham.
* Adjust makefile to make sure the install directories are created
before files are copied into them.
* Fix minor bug in optimizing of argument parsing. Based on
report from jakemus on freshmeat.
-- Petter Reinholdtsen <pere@hungry.com> Sun, 12 Jul 2009 19:58:10 +0200

View File

@ -2629,9 +2629,10 @@ int main(int argc, char **argv)
*/
isinit = (getpid() == 1);
for (f = 1; f < argc; f++) {
if (!strcmp(argv[f], "-i") || !strcmp(argv[f], "--init"))
if (!strcmp(argv[f], "-i") || !strcmp(argv[f], "--init")) {
isinit = 1;
break;
}
}
if (!isinit) exit(telinit(p, argc, argv));