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

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

unsigned int unirandom_readb (unirandom *u, char *s, unsigned int n)
{
  if (!u->initted && !unirandom_init(u)) return 0 ;
  return (*u->readb)(&u->data, s, n) ;
}