aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/ffi
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2018-12-29 09:15:28 -0500
committerJack Lloyd <[email protected]>2018-12-29 09:15:28 -0500
commit30f79bda793634bb1891e61ee4ea998a64c9b13b (patch)
tree5e0f1b6bbbce02e790504cd01064ade94d17d58e /src/lib/ffi
parent69cad041fd2bf9bf09ca378537d28983a4fce03a (diff)
Add OS::read_env_variable
Combines the priv check and the getenv call on one.
Diffstat (limited to 'src/lib/ffi')
-rw-r--r--src/lib/ffi/ffi.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/ffi/ffi.cpp b/src/lib/ffi/ffi.cpp
index cfc2cb2d5..b0c1f6e71 100644
--- a/src/lib/ffi/ffi.cpp
+++ b/src/lib/ffi/ffi.cpp
@@ -18,7 +18,7 @@ namespace Botan_FFI {
int ffi_error_exception_thrown(const char* func_name, const char* exn, int rc)
{
- if(Botan::OS::running_in_privileged_state() == false && std::getenv("BOTAN_FFI_PRINT_EXCEPTIONS") != nullptr)
+ if(Botan::OS::read_env_variable("BOTAN_FFI_PRINT_EXCEPTIONS") != nullptr)
{
std::fprintf(stderr, "in %s exception '%s' returning %d\n", func_name, exn, rc);
}