]> xenbits.xensource.com Git - people/andrewcoop/xen.git/commitdiff
lib/inflate.c: remove dead code
authorAriel Otilibili <ariel.otilibili-anieli@eurecom.fr>
Wed, 26 Mar 2025 11:30:35 +0000 (12:30 +0100)
committerJan Beulich <jbeulich@suse.com>
Wed, 26 Mar 2025 11:30:35 +0000 (12:30 +0100)
This is a follow up from a discussion in Xen:

The if-statement tests that `res` is non-zero; meaning the case zero is
never reached.

Link: https://lore.kernel.org/all/7587b503-b2ca-4476-8dc9-e9683d4ca5f0@suse.com/
Link: https://lkml.kernel.org/r/20241219092615.644642-2-ariel.otilibili-anieli@eurecom.fr
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Ariel Otilibili <ariel.otilibili-anieli@eurecom.fr>
Suggested-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Origin: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 41c761dede6e
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/common/gzip/inflate.c

index b9a2d7a23a8aa92c36066e32462430a3ec10c899..cb146555c815d6fb0ebf1ed9bd728424a75e1e91 100644 (file)
@@ -1164,8 +1164,6 @@ static int __init gunzip(struct gunzip_state *s)
     if ( (res = inflate(s)) )
     {
         switch (res) {
-        case 0:
-            break;
         case 1:
             error("invalid compressed format (err=1)");
             break;