Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/imath.c

    r5a6cc679 re3272101  
    5050errno_t ipow10_u64(unsigned exp, uint64_t *res)
    5151{
    52         unsigned a;
     52        uint64_t a;
    5353        uint64_t r;
    5454
     
    8181 *
    8282 * @param v Value to compute logarithm from
     83 * @param res Place to store result
     84 * @return EOK on success
    8385 * @return Logarithm value
    8486 */
    85 unsigned ilog10_u64(uint64_t v)
     87errno_t ilog10_u64(uint64_t v, unsigned *res)
    8688{
     89        if (v == 0)
     90                return ERANGE;
     91
    8792        unsigned b;
    8893        unsigned e;
     
    117122        }
    118123
    119         return r;
     124        *res = r;
     125        return EOK;
    120126}
    121127
Note: See TracChangeset for help on using the changeset viewer.