about summary refs log tree commit diff
path: root/lib/pmfileio.c
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2022-04-16 20:44:05 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2022-04-16 20:44:05 +0000
commit1f5f4d6f6407ad16189b7873b2c87a3be470cc8c (patch)
treefb39327df5af86ea1942a9ba92824f51b2eacf5e /lib/pmfileio.c
parentab6bfca47aece5ad46512da0894f8cc1d058c448 (diff)
downloadnetpbm-mirror-1f5f4d6f6407ad16189b7873b2c87a3be470cc8c.tar.gz
netpbm-mirror-1f5f4d6f6407ad16189b7873b2c87a3be470cc8c.tar.xz
netpbm-mirror-1f5f4d6f6407ad16189b7873b2c87a3be470cc8c.zip
Remove previous commit (4321) -- type coercion doesn't work the way I thought it did
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@4326 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'lib/pmfileio.c')
-rw-r--r--lib/pmfileio.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/lib/pmfileio.c b/lib/pmfileio.c
index 1109f340..1ed71f18 100644
--- a/lib/pmfileio.c
+++ b/lib/pmfileio.c
@@ -633,8 +633,8 @@ pm_readbigshort(FILE *  const ifP,
 
     unsigned short s;
 
-    s  = (unsigned short)getcNofail(ifP) << 8;
-    s |= (unsigned short)getcNofail(ifP) << 0;
+    s  = getcNofail(ifP) << 8;
+    s |= getcNofail(ifP) << 0;
 
     *sP = s;
 
@@ -661,10 +661,10 @@ pm_readbiglong(FILE * const ifP,
 
     unsigned long l;
 
-    l  = (unsigned long)getcNofail(ifP) << 24ul;
-    l |= (unsigned long)getcNofail(ifP) << 16ul;
-    l |= (unsigned long)getcNofail(ifP) <<  8ul;
-    l |= (unsigned long)getcNofail(ifP) <<  0ul;
+    l  = getcNofail(ifP) << 24;
+    l |= getcNofail(ifP) << 16;
+    l |= getcNofail(ifP) <<  8;
+    l |= getcNofail(ifP) <<  0;
 
     *lP = l;
 
@@ -709,8 +709,8 @@ pm_readlittleshort(FILE *  const ifP,
                    short * const sP) {
     unsigned short s;
 
-    s  = (unsigned short)getcNofail(ifP) << 0;
-    s |= (unsigned short)getcNofail(ifP) << 8;
+    s  = getcNofail(ifP) << 0;
+    s |= getcNofail(ifP) << 8;
 
     *sP = s;
 
@@ -736,10 +736,10 @@ pm_readlittlelong(FILE * const ifP,
                   long * const lP) {
     unsigned long l;
 
-    l  = (unsigned long)getcNofail(ifP) <<  0ul;
-    l |= (unsigned long)getcNofail(ifP) <<  8ul;
-    l |= (unsigned long)getcNofail(ifP) << 16ul;
-    l |= (unsigned long)getcNofail(ifP) << 24ul;
+    l  = getcNofail(ifP) <<  0;
+    l |= getcNofail(ifP) <<  8;
+    l |= getcNofail(ifP) << 16;
+    l |= getcNofail(ifP) << 24;
 
     *lP = l;