summaryrefslogtreecommitdiff
path: root/src/librandom/unirandom_readb.c
blob: cbe45a686b69327c859aaf3d611f10cf09e2f91e (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_ref u, char *s, unsigned int n)
{
  if (!u->initted && !unirandom_init(u)) return 0 ;
  return (*u->readb)(&u->data, s, n) ;
}