diff options
author | Jack Lloyd <[email protected]> | 2017-10-11 17:02:38 -0400 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2017-10-11 17:02:38 -0400 |
commit | e831b200214ec611c3bd98f3a2df78e04dfc3536 (patch) | |
tree | daafa5c8171008b7556a59027229251248f3260a /src/lib/ffi/ffi_rng.cpp | |
parent | fb3076f04336418d2daa5d278f2895d0174dedb9 (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.cpp | 3 |
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"); |