shithub: jbig2

Download patch

ref: 398186762d6f73d1632d8c6d846f2066c3087751
parent: 45b08bae123703133643022d4fdf2e0496a00682
author: Sebastian Rasmussen <[email protected]>
date: Thu Apr 5 20:44:10 EDT 2018

jbig2dec: Remove unused return value for setting pixel.

--- a/jbig2_image.c
+++ b/jbig2_image.c
@@ -359,7 +359,7 @@
 }
 
 /* set an individual pixel value in an image */
-int
+void
 jbig2_image_set_pixel(Jbig2Image *image, int x, int y, bool value)
 {
     const int w = image->width;
@@ -368,9 +368,9 @@
     int bit, byte;
 
     if ((x < 0) || (x >= w))
-        return 0;
+        return;
     if ((y < 0) || (y >= h))
-        return 0;
+        return;
 
     byte = (x >> 3) + y * image->stride;
     bit = 7 - (x & 7);
@@ -378,6 +378,4 @@
 
     scratch = image->data[byte] & mask;
     image->data[byte] = scratch | (value << bit);
-
-    return 1;
 }
--- a/jbig2_image.h
+++ b/jbig2_image.h
@@ -21,7 +21,7 @@
 #define _JBIG2_IMAGE_H
 
 int jbig2_image_get_pixel(Jbig2Image *image, int x, int y);
-int jbig2_image_set_pixel(Jbig2Image *image, int x, int y, bool value);
+void jbig2_image_set_pixel(Jbig2Image *image, int x, int y, bool value);
 
 /* routines for dumping the image data in various formats */
 /* FIXME: should these be in the client instead? */