fixes return value for multiplication with zero in ucx_szmul v1.0.1

Sun, 21 Jan 2018 14:10:59 +0100

author
Mike Becker <universe@uap-core.de>
date
Sun, 21 Jan 2018 14:10:59 +0100
changeset 273
9c1591b3c4a4
parent 272
2def28b65328
child 274
0923c036b913

fixes return value for multiplication with zero in ucx_szmul

src/ucx.c file | annotate | diff | comparison | revisions
--- a/src/ucx.c	Sun Jan 21 10:57:32 2018 +0100
+++ b/src/ucx.c	Sun Jan 21 14:10:59 2018 +0100
@@ -49,7 +49,7 @@
 int ucx_szmul(size_t a, size_t b, size_t *result) {
     if(a == 0 || b == 0) {
         *result = 0;
-        return 1;
+        return 0;
     }
     size_t r = a * b;
     if(r / b == a) {
@@ -61,3 +61,4 @@
     }
 }
 #endif
+

mercurial