about summary refs log tree commit diff
path: root/src/librandom/unirandom_finish.c
blob: bb54eb54c852dfb8efb8ec28b97ce0023913933a (plain) (blame)
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 *u)
{
  if (!u->initted) return 1 ;
  if (!(*u->finish)(&u->data)) return 0 ;
  u->initted = 0 ;
  return 1 ;
}