[gegl] buffer: simplify gegl_scratch_new() overflow check



commit 0e544c7b669b447efd0aec78e06fbc4e98edd37b
Author: Ell <ell_se yahoo com>
Date:   Sun Jan 6 10:12:56 2019 -0500

    buffer: simplify gegl_scratch_new() overflow check

 gegl/buffer/gegl-scratch.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gegl/buffer/gegl-scratch.h b/gegl/buffer/gegl-scratch.h
index 74b2af435..21ba11cca 100644
--- a/gegl/buffer/gegl-scratch.h
+++ b/gegl/buffer/gegl-scratch.h
@@ -56,7 +56,7 @@ void       gegl_scratch_free   (gpointer ptr);
 
 
 #define _GEGL_SCRATCH_MUL(x, y) \
-  (G_LIKELY ((y) == 0 || (x) <= G_MAXSIZE / (y)) ? (x) * (y) : G_MAXSIZE)
+  (G_LIKELY ((y) <= G_MAXSIZE / (x)) ? (x) * (y) : G_MAXSIZE)
 
 /**
  * gegl_scratch_new: (skip)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]