From 34b113baba1010753f654d9a7ea6c7e36e9edeb6 Mon Sep 17 00:00:00 2001 From: Alejandro Colomar Date: Mon, 15 Jan 2024 18:23:17 +0100 Subject: [PATCH] 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 --- lib/sgetspent.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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)) ) { -- 2.47.3