about summary refs log tree commit diff
path: root/src/librandom/random_name.c
blob: 873669905f3bf2172d67d431f55f84ef000f7188 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
/* ISC license. */

/* MT-unsafe */

#include "random-internal.h"
#include <skalibs/random.h>

int random_name (char *s, unsigned int n)
{
  register unsigned int r = rrandom_name(&badrandom_here, s, n, 1) ;
  if (r < n) return -1 ;
  return n ;
}