Skip to contentSkip to conversation

Remove pointless check in zlib

PATCH New Dave Jones 1 participant 1 message Sep 1, 2004

lore
Share & tools
lore

Dave Jones

author
#0 lore raw

PATCH 1/1 Remove pointless check in zlib

We dereference 'z' a few lines above this check. If it was possible to hit this condition, it wouldve triggered long ago, in the form of a crash.

Spotted with the source checker from Coverity.com.

lib/zlib_inflate/inflate.c +0 -2
diff -urpN --exclude-from=/home/davej/.exclude bk-linus/lib/zlib_inflate/inflate.c linux-2.6/lib/zlib_inflate/inflate.c
@@ -53,8 +53,6 @@ int zlib_inflateInit2_(
       return Z_VERSION_ERROR;
 
   /* initialize state */
-  if (z == NULL)
-    return Z_STREAM_ERROR;
   z->msg = NULL;
   z->state = &WS(z)->internal_state;
   z->state->blocks = NULL;