summaryrefslogtreecommitdiff
path: root/src/librandom/unirandom_finish.c
blob: 14c44119a1f3a5907dd1bf2dc01620e4e407bdc6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
/* ISC license. */

#include <errno.h>
#include <skalibs/unirandom.h>

int unirandom_finish (unirandom_ref u)
{
  if (!u->initted) return 1 ;
  if (!(*u->finish)(&u->data)) return 0 ;
  u->initted = 0 ;
  return 1 ;
}