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
     1.1 --- a/src/ucx.c	Sun Jan 21 10:57:32 2018 +0100
     1.2 +++ b/src/ucx.c	Sun Jan 21 14:10:59 2018 +0100
     1.3 @@ -49,7 +49,7 @@
     1.4  int ucx_szmul(size_t a, size_t b, size_t *result) {
     1.5      if(a == 0 || b == 0) {
     1.6          *result = 0;
     1.7 -        return 1;
     1.8 +        return 0;
     1.9      }
    1.10      size_t r = a * b;
    1.11      if(r / b == a) {
    1.12 @@ -61,3 +61,4 @@
    1.13      }
    1.14  }
    1.15  #endif
    1.16 +

mercurial