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

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

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