From 4a90dd1f9063fd5a91431ee6873c25c5c8229805 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Fri, 14 Oct 2016 17:16:43 +0000 Subject: Port to the new librandom API --- src/conn-tools/s6-accessrules-cdb-from-fs.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/conn-tools/s6-accessrules-cdb-from-fs.c') diff --git a/src/conn-tools/s6-accessrules-cdb-from-fs.c b/src/conn-tools/s6-accessrules-cdb-from-fs.c index 20fef4d..c1aa992 100644 --- a/src/conn-tools/s6-accessrules-cdb-from-fs.c +++ b/src/conn-tools/s6-accessrules-cdb-from-fs.c @@ -110,8 +110,10 @@ int main (int argc, char const *const *argv) int fd ; PROG = "s6-accessrules-cdb-from-fs" ; if (argc < 3) strerr_dieusage(100, USAGE) ; + if (!random_init()) + strerr_diefu1sys(111, "init random generator") ; if (!stralloc_cats(&tmp, argv[1])) return 0 ; - if (random_sauniquename(&tmp, 8) < 0) + if (!random_sauniquename(&tmp, 8)) strerr_diefu1sys(111, "random_sauniquename") ; if (!stralloc_readyplus(&tmp, 8210)) strerr_diefu1sys(111, "stralloc_catb") ; -- cgit v1.3.1