diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2018-12-07 21:00:23 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2018-12-07 21:00:23 +0000 |
commit | 2f017fbdd689e025437783cc8d675a7d304b37c3 (patch) | |
tree | 57645420ed02a56ab4e6abfc3b1ff9847ee96c8e /src/librandom | |
parent | 1af5a42e566da1e615abae7868ae7a10260ce0b8 (diff) | |
download | skalibs-2f017fbdd689e025437783cc8d675a7d304b37c3.tar.xz |
Add mk?temp and autosurf
Diffstat (limited to 'src/librandom')
-rw-r--r-- | src/librandom/random-internal.h | 1 | ||||
-rw-r--r-- | src/librandom/random_name.c | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/librandom/random-internal.h b/src/librandom/random-internal.h index c915170..a8f8be9 100644 --- a/src/librandom/random-internal.h +++ b/src/librandom/random-internal.h @@ -5,6 +5,7 @@ #include <skalibs/surf.h> +extern char const *random_oklist ; extern int random_fd ; extern SURFSchedule surf_here ; diff --git a/src/librandom/random_name.c b/src/librandom/random_name.c index bba1331..057a5db 100644 --- a/src/librandom/random_name.c +++ b/src/librandom/random_name.c @@ -1,10 +1,10 @@ /* ISC license. */ #include <skalibs/random.h> +#include "random-internal.h" void random_name (char *s, size_t n) { - static char const oklist[64] = "ABCDEFGHIJKLMNOPQRSTUVWXYZghijklmnopqrstuvwxyz-_0123456789abcdef" ; random_string(s, n) ; - while (n--) s[n] = oklist[s[n] & 63] ; + while (n--) s[n] = random_oklist[s[n] & 63] ; } |