From 6782e15a1a451a11176871198a0d150293f15878 Mon Sep 17 00:00:00 2001 From: giraffedata Date: Sun, 29 Mar 2015 02:27:43 +0000 Subject: cleanup git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@2431 9d0c8265-081b-0410-96cb-a4ca84ce46f8 --- converter/other/giftopnm.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/converter/other/giftopnm.c b/converter/other/giftopnm.c index 23433c1e..d19620aa 100644 --- a/converter/other/giftopnm.c +++ b/converter/other/giftopnm.c @@ -41,7 +41,6 @@ #define INTERLACE 0x40 #define LOCALCOLORMAP 0x80 -#define BitSet(byte, bit) (((byte) & (bit)) == (bit)) #if !defined(BYTE_ORDER) || !defined(LITTLE_ENDIAN) /* make sure (BYTE_ORDER == LITTLE_ENDIAN) is FALSE */ @@ -1755,7 +1754,7 @@ readGifHeader(FILE * const gifFileP, pm_message("Colors = %d Color Resolution = %d", cmapSize, gifScreenP->colorResolution); } - if (BitSet(buf[4], LOCALCOLORMAP)) { /* Global Colormap */ + if (buf[4] & LOCALCOLORMAP) { /* Global Colormap */ readColorMap(gifFileP, cmapSize, &gifScreenP->colorMap, &gifScreenP->hasGray, &gifScreenP->hasColor); if (verbose) { @@ -1885,13 +1884,13 @@ readImageHeader(FILE * const ifP, if (error) pm_error("couldn't read left/top/width/height. %s", error); - imageHeaderP->useGlobalColormap = ! BitSet(buf[8], LOCALCOLORMAP); + imageHeaderP->useGlobalColormap = !(buf[8] & LOCALCOLORMAP); imageHeaderP->localColorMapSize = 1u << ((buf[8] & 0x07) + 1); imageHeaderP->lpos = LM_to_uint(buf[0], buf[1]); imageHeaderP->tpos = LM_to_uint(buf[2], buf[3]); imageHeaderP->cols = LM_to_uint(buf[4], buf[5]); imageHeaderP->rows = LM_to_uint(buf[6], buf[7]); - imageHeaderP->interlaced = !!BitSet(buf[8], INTERLACE); + imageHeaderP->interlaced = !!(buf[8] & INTERLACE); if (verbose) reportImageHeader(*imageHeaderP); -- cgit 1.4.1