From: Christian Göttsche Date: Thu, 26 Jan 2023 20:40:47 +0000 (+0100) Subject: lib/commonio: drop dead store X-Git-Tag: 4.15.0-rc1~221 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a08021eb0e6d711a8e1655eb5736a7f3679ab7a9;p=thirdparty%2Fshadow.git lib/commonio: drop dead store commonio.c:522:15: warning: Although the value stored to 'cp' is used in the enclosing expression, the value is never actually read from 'cp' [deadcode.DeadStores] Reviewed-by: Alejandro Colomar --- diff --git a/lib/commonio.c b/lib/commonio.c index 9349597ae..24c472bc9 100644 --- a/lib/commonio.c +++ b/lib/commonio.c @@ -646,7 +646,7 @@ int commonio_open (struct commonio_db *db, int mode) } while (db->ops->fgets (buf, buflen, db->fp) == buf) { - while ( ((cp = strrchr (buf, '\n')) == NULL) + while ( (strrchr (buf, '\n') == NULL) && (feof (db->fp) == 0)) { size_t len;