summaryrefslogtreecommitdiff
path: root/src/librandom/unirandom_init.c
blob: 6324d717c17ae10a4933180dba35941e6bc8dd58 (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 *u)
{
  if (u->initted) return 1 ;
  if (!(*u->init)(&u->data)) return 0 ;
  u->initted = 1 ;
  return 1 ;
}