# HG changeset patch # User Mike Becker # Date 1576777643 -3600 # Node ID 6f63f5ed3cabe194f87104ff286c38c88f1b5af6 # Parent a3e494af5c09f5144e261c4069dfb4b990ea6f0d adds missing documentation for custom multiplication function diff -r a3e494af5c09 -r 6f63f5ed3cab src/ucx/ucx.h --- a/src/ucx/ucx.h Thu Dec 19 18:40:00 2019 +0100 +++ b/src/ucx/ucx.h Thu Dec 19 18:47:23 2019 +0100 @@ -170,10 +170,7 @@ /** * Performs a multiplication of size_t values and checks for overflow. - * - * This is a custom implementation in case there is no compiler builtin - * available. - * + * * @param a first operand * @param b second operand * @param result a pointer to a size_t, where the result should @@ -183,6 +180,18 @@ */ #define ucx_szmul(a, b, result) ucx_szmul_impl(a, b, result) +/** + * Performs a multiplication of size_t values and checks for overflow. + * + * This is a custom implementation in case there is no compiler builtin + * available. + * + * @param a first operand + * @param b second operand + * @param result a pointer to a size_t where the result should be stored + * @return zero, if no overflow occurred and the result is correct, non-zero + * otherwise + */ int ucx_szmul_impl(size_t a, size_t b, size_t *result); #endif