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

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

unsigned int unirandom_readnb (unirandom_ref u, char *s, unsigned int n)
{
  if (!u->initted && !unirandom_init(u)) return 0 ;
  return (*u->readnb)(&u->data, s, n) ;
}