]> git.ipfire.org Git - thirdparty/shadow.git/commit
src/sulogin.c: Invert logic to reduce indentation
authorAlejandro Colomar <alx@kernel.org>
Thu, 18 Jan 2024 10:15:17 +0000 (11:15 +0100)
committerSerge Hallyn <serge@hallyn.com>
Thu, 14 Mar 2024 21:16:15 +0000 (16:16 -0500)
commit88760598f079f945fc7b6c72786e3101fd4f45b1
tree21b652bb97ec5445e97bfe33d5d3fb8fdb29532e
parentefd169e010f8c4dc7b6167e775dfae6b869150d5
src/sulogin.c: Invert logic to reduce indentation

Also, it was checking for >=0 for success, but since that code is for
opening a different tty as stdin, that was bogus.  But since it's
guaranteed to be either 0 or -1, this commit doesn't add any code to
make sure it's 0 (i.e., we could say !=0 instead of ==-1).  That's more
appropriate for a different commit.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
src/sulogin.c