]> git.ipfire.org Git - thirdparty/shadow.git/commitdiff
lib/commonio: drop dead store
authorChristian Göttsche <cgzones@googlemail.com>
Thu, 26 Jan 2023 20:40:47 +0000 (21:40 +0100)
committerSerge Hallyn <serge@hallyn.com>
Mon, 21 Aug 2023 19:05:27 +0000 (14:05 -0500)
    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 <alx@kernel.org>
lib/commonio.c

index 9349597ae40a38c05a85fdcde6279a37e792e9b2..24c472bc9d5952d296eb7a6885f0dc9587167472 100644 (file)
@@ -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;