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 <alx@kernel.org>
This commit is contained in:
Alejandro Colomar
2024-01-15 18:23:17 +01:00
committed by Serge Hallyn
parent 93151689c0
commit 34b113baba

View File

@@ -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)) ) {