summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/libtiff/libtiff/tif_lzw.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/libtiff/libtiff/tif_lzw.c')
-rw-r--r--src/3rdparty/libtiff/libtiff/tif_lzw.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/3rdparty/libtiff/libtiff/tif_lzw.c b/src/3rdparty/libtiff/libtiff/tif_lzw.c
index 21064f2..d92d0fd 100644
--- a/src/3rdparty/libtiff/libtiff/tif_lzw.c
+++ b/src/3rdparty/libtiff/libtiff/tif_lzw.c
@@ -214,19 +214,16 @@ LZWSetupDecode(TIFF* tif)
return (0);
}
- DecoderState(tif)->dec_codetab = NULL;
- DecoderState(tif)->dec_decode = NULL;
+ sp = DecoderState(tif);
+ sp->dec_codetab = NULL;
+ sp->dec_decode = NULL;
/*
* Setup predictor setup.
*/
(void) TIFFPredictorInit(tif);
-
- sp = DecoderState(tif);
}
- assert(sp != NULL);
-
if (sp->dec_codetab == NULL) {
sp->dec_codetab = (code_t*)_TIFFmalloc(CSIZE*sizeof (code_t));
if (sp->dec_codetab == NULL) {
@@ -1161,6 +1158,7 @@ int
TIFFInitLZW(TIFF* tif, int scheme)
{
static const char module[] = "TIFFInitLZW";
+ (void)scheme;
assert(scheme == COMPRESSION_LZW);
/*
* Allocate state block so tag methods have storage to record values.
@@ -1218,7 +1216,7 @@ bad:
* from this software without specific prior written permission.
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/
#endif /* LZW_SUPPORT */