]> git.ipfire.org Git - thirdparty/util-linux.git/commit
chsh: simplify check_shell()
authorSami Kerola <kerolasa@iki.fi>
Fri, 19 Dec 2014 19:56:29 +0000 (19:56 +0000)
committerSami Kerola <kerolasa@iki.fi>
Mon, 5 Jan 2015 22:52:51 +0000 (22:52 +0000)
commit1df0219f2cf7a34ebc98b96fcbf3aa68bc6f3fd5
treed2fc4ea39d9e5779e2fcfcd891a3602275c801e7
parente323df25f52018a8adaa5aeaca48c22265f8d637
chsh: simplify check_shell()

Shell null check is redundant.  The shell can be null only after
ask_new_shell returned such, and that is checked earlier in program
logic.

Secondly the check_shell does not need to return values, in such cases
the program can simply exit.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
login-utils/chsh.c