No use checkinf if env is true in the branch where it is false (Coverity CID 1164462).
authorPetter Reinholdtsen <pere@hungry.com>
Tue, 28 Jan 2014 22:29:30 +0000 (22:29 +0000)
committerPetter Reinholdtsen <pere@hungry.com>
Tue, 28 Jan 2014 22:29:30 +0000 (22:29 +0000)
git-svn-id: svn://svn.sv.gnu.org/sysvinit/sysvinit/trunk@141 456724a4-4300-0410-8514-c89748c515a2

src/init.c

index 8c236fc849dd3efd57d516a7e09d16544e581f51..418755306708c99f1412ef95b94642879861bab3 100644 (file)
@@ -2788,7 +2788,7 @@ int telinit(char *progname, int argc, char **argv)
                if (!strchr("0123456789SsQqAaBbCcUu", argv[optind][0]))
                        usage(progname);
                request.cmd = INIT_CMD_RUNLVL;
                if (!strchr("0123456789SsQqAaBbCcUu", argv[optind][0]))
                        usage(progname);
                request.cmd = INIT_CMD_RUNLVL;
-               request.runlevel  = env ? 0 : argv[optind][0];
+               request.runlevel  = argv[optind][0];
                request.sleeptime = sltime;
        }
 
                request.sleeptime = sltime;
        }