From: Alejandro Colomar Date: Mon, 15 Jan 2024 17:23:17 +0000 (+0100) Subject: lib/sgetspent.c: sgetspent(): Explicitly use an empty string literal X-Git-Tag: 4.15.1~17 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=34b113baba1010753f654d9a7ea6c7e36e9edeb6;p=thirdparty%2Fshadow.git lib/sgetspent.c: sgetspent(): Explicitly use an empty string literal cp can only be an empty string literal in that conditional. Use a string literal to be more explicit. Signed-off-by: Alejandro Colomar --- diff --git a/lib/sgetspent.c b/lib/sgetspent.c index 0ac1edd61..758258f90 100644 --- a/lib/sgetspent.c +++ b/lib/sgetspent.c @@ -73,9 +73,8 @@ sgetspent(const char *string) } } - if (i == (FIELDS - 1)) { - fields[i++] = cp; - } + if (i == (FIELDS - 1)) + fields[i++] = ""; if ( ((NULL != cp) && ('\0' != *cp)) || ((i != FIELDS) && (i != OFIELDS)) ) {