diff options
author | Caolán McNamara <caolan.mcnamara@collabora.com> | 2024-05-03 16:33:11 +0100 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2024-05-10 18:25:27 +0200 |
commit | 3f15ad602da8a68d7cb63b02d9b456b0bd1d623b (patch) | |
tree | d13afbe3e22d68812a74f46d3ad78b8e18d7937e /binaryurp | |
parent | e747e6df648a7ff076663ab376a4dbbc041b5180 (diff) |
drop requirement for rtl_random_getBytes to have "Pool" arg
Seeing as since:
commit e9531b792ddf0cfc2db11713b574c5fc7ae09e2c
Date: Tue Feb 6 14:39:47 2024 +0100
sal: rtlRandomPool: require OS random device, abort if not present
Both rtl_random_createPool() and rtl_random_getBytes() first try to get
random data from the OS, via /dev/urandom or rand_s() (documented to
call RtlGenRandom(), see [1]).
we don't use the initial arg to rtl_random_getBytes anymore, drop the
requirement to have one. Then simplify our usages of that, and
addtionally deprecate rtl_random_createPool and rtl_random_destroyPool.
Change-Id: I13dcc067714a8a741a4e8f2bfcf2006373f832c4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167335
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Diffstat (limited to 'binaryurp')
-rw-r--r-- | binaryurp/source/bridge.cxx | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/binaryurp/source/bridge.cxx b/binaryurp/source/bridge.cxx index 523bbbf14ac5..f8c4cb232562 100644 --- a/binaryurp/source/bridge.cxx +++ b/binaryurp/source/bridge.cxx @@ -74,9 +74,7 @@ namespace { sal_Int32 random() { sal_Int32 n; - rtlRandomPool pool = rtl_random_createPool(); - rtl_random_getBytes(pool, &n, sizeof n); - rtl_random_destroyPool(pool); + (void)rtl_random_getBytes(nullptr, &n, sizeof n); return n; } |