]> git.ipfire.org Git - thirdparty/shadow.git/commitdiff
Omit unneeded test in change_field()
authorPaul Eggert <eggert@cs.ucla.edu>
Sat, 11 Mar 2023 21:41:54 +0000 (13:41 -0800)
committerIker Pedrosa <ikerpedrosam@gmail.com>
Tue, 28 Mar 2023 11:00:38 +0000 (13:00 +0200)
* fields.c (change_field): Omit unnecessary test.

Signed-off-by: Paul Eggert <eggert@cs.ucla.edu>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
Reviewed-by: Iker Pedrosa <ipedrosa@redhat.com>
lib/fields.c

index 8801bce6a4870482a111ca819ee3b54712c8719a..fa5fd1567cfcc62880353a65f5c4fb464b3c05e7 100644 (file)
@@ -96,7 +96,7 @@ void change_field (char *buf, size_t maxsize, const char *prompt)
                *cp = '\0';
 
                cp = newf;
-               while (('\0' != *cp) && isspace (*cp)) {
+               while (isspace (*cp)) {
                        cp++;
                }