summaryrefslogtreecommitdiff
path: root/src/libbiguint/bu_len.c
blob: b6be726702d37982dfb41c7fa65a93aec7bf6aa4 (plain)
1
2
3
4
5
6
7
8
9
10
/* ISC license. */

#include <stdint.h>
#include <skalibs/biguint.h>

unsigned int bu_len (register uint32_t const *a, register unsigned int n)
{
  while (n--) if (a[n]) return n+1 ;
  return 0 ;
}