about summary refs log tree commit diff
path: root/converter/pbm/brushtopbm.c
diff options
context:
space:
mode:
Diffstat (limited to 'converter/pbm/brushtopbm.c')
-rw-r--r--converter/pbm/brushtopbm.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/converter/pbm/brushtopbm.c b/converter/pbm/brushtopbm.c
index c50fe8a1..ebd817be 100644
--- a/converter/pbm/brushtopbm.c
+++ b/converter/pbm/brushtopbm.c
@@ -93,11 +93,7 @@ main(int argc, const char ** argv)  {
             bitrow[i] = ~bitrow[i];
 
         /* Clean off remainder of fractional last character */
-        if (cols % 8 > 0) {
-            unsigned int const colChars = pbm_packed_bytes(cols);
-            bitrow[colChars-1] >>= 8 - cols % 8;
-            bitrow[colChars-1] <<= 8 - cols % 8;
-        }
+        pbm_cleanrowend_packed(bitrow, cols);
 
         pbm_writepbmrow_packed(stdout, bitrow, cols, 0);
     }