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

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

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