[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[xen staging] lib/inflate.c: remove dead code



commit e1691d3de1fc3326fbb9388de7351d3f5ef6b8e0
Author:     Ariel Otilibili <ariel.otilibili-anieli@xxxxxxxxxx>
AuthorDate: Wed Mar 26 12:30:35 2025 +0100
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Wed Mar 26 12:30:35 2025 +0100

    lib/inflate.c: remove dead code
    
    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@xxxxxxxx/
    Link: 
https://lkml.kernel.org/r/20241219092615.644642-2-ariel.otilibili-anieli@xxxxxxxxxx
    Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
    Signed-off-by: Ariel Otilibili <ariel.otilibili-anieli@xxxxxxxxxx>
    Suggested-by: Jan Beulich <jbeulich@xxxxxxxx>
    Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
    Origin: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
41c761dede6e
    Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
    Acked-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
---
 xen/common/gzip/inflate.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/xen/common/gzip/inflate.c b/xen/common/gzip/inflate.c
index b9a2d7a23a..cb146555c8 100644
--- a/xen/common/gzip/inflate.c
+++ b/xen/common/gzip/inflate.c
@@ -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;
--
generated by git-patchbot for /home/xen/git/xen.git#staging



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.