aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/ffi/ffi_rng.cpp
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2017-10-11 17:02:38 -0400
committerJack Lloyd <[email protected]>2017-10-11 17:02:38 -0400
commite831b200214ec611c3bd98f3a2df78e04dfc3536 (patch)
treedaafa5c8171008b7556a59027229251248f3260a /src/lib/ffi/ffi_rng.cpp
parentfb3076f04336418d2daa5d278f2895d0174dedb9 (diff)
Simplify ffi call overhead
Notable reductions in code size, stack size and function call overhead.
Diffstat (limited to 'src/lib/ffi/ffi_rng.cpp')
-rw-r--r--src/lib/ffi/ffi_rng.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/ffi/ffi_rng.cpp b/src/lib/ffi/ffi_rng.cpp
index 68b4aaf64..88c522dfd 100644
--- a/src/lib/ffi/ffi_rng.cpp
+++ b/src/lib/ffi/ffi_rng.cpp
@@ -17,7 +17,8 @@ using namespace Botan_FFI;
int botan_rng_init(botan_rng_t* rng_out, const char* rng_type)
{
return ffi_guard_thunk(BOTAN_CURRENT_FUNCTION, [=]() {
- BOTAN_ASSERT_ARG_NON_NULL(rng_out);
+ if(rng_out == nullptr)
+ return BOTAN_FFI_ERROR_NULL_POINTER;
const std::string rng_type_s(rng_type ? rng_type : "system");