From 2f017fbdd689e025437783cc8d675a7d304b37c3 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Fri, 7 Dec 2018 21:00:23 +0000 Subject: Add mk?temp and autosurf --- src/librandom/random-internal.h | 1 + src/librandom/random_name.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'src/librandom') 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 +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 +#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] ; } -- cgit v1.2.3