From 59f33411aa3ca7c9aebdb61840c1a545ebbb438d Mon Sep 17 00:00:00 2001 From: giraffedata Date: Wed, 6 May 2015 02:44:27 +0000 Subject: cleanup git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@2480 9d0c8265-081b-0410-96cb-a4ca84ce46f8 --- lib/libpbm2.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/lib/libpbm2.c b/lib/libpbm2.c index 8a7e3f1e..0d824877 100644 --- a/lib/libpbm2.c +++ b/lib/libpbm2.c @@ -126,26 +126,23 @@ pbm_readpbmrow( FILE * const file, int const format) { int col, bitshift; - bit * bP; switch ( format ) { case PBM_FORMAT: - for ( col = 0, bP = bitrow; col < cols; ++col, ++bP ) - *bP = getbit( file ); + for ( col = 0; col < cols; ++col ) + bitrow[col] = getbit( file ); break; case RPBM_FORMAT: { - register unsigned char item; + unsigned char item; bitshift = -1; item = 0; /* item's value is meaningless here */ - for ( col = 0, bP = bitrow; col < cols; ++col, ++bP ) - { - if ( bitshift == -1 ) - { + for ( col = 0; col < cols; ++col ) { + if ( bitshift == -1 ) { item = pm_getrawbyte( file ); bitshift = 7; } - *bP = ( item >> bitshift ) & 1; + bitrow[col] = ( item >> bitshift ) & 1; --bitshift; } } -- cgit 1.4.1