]> git.imager.perl.org - imager.git/blobdiff - iolayert.h
hopefully avoid coverity complaining about a float vs int comparison
[imager.git] / iolayert.h
index d2dbb4dd02460a7965c9c36409241519536ce175..8d19451cec635dfffe4d14f956f769695f7671c7 100644 (file)
@@ -90,6 +90,10 @@ struct i_io_glue_t {
   ((ig)->read_ptr < (ig)->read_end ? \
      *((ig)->read_ptr++) : \
      i_io_getc_imp(ig))
   ((ig)->read_ptr < (ig)->read_end ? \
      *((ig)->read_ptr++) : \
      i_io_getc_imp(ig))
+#define i_io_nextc(ig) \
+  ((void)((ig)->read_ptr < (ig)->read_end ?    \
+         ((ig)->read_ptr++, 0) :               \
+         i_io_getc_imp(ig)))
 #define i_io_peekc(ig) \
   ((ig)->read_ptr < (ig)->read_end ? \
    *((ig)->read_ptr) :              \
 #define i_io_peekc(ig) \
   ((ig)->read_ptr < (ig)->read_end ? \
    *((ig)->read_ptr) :              \