From 1c5626cd8a3dd28d7d09e01d6d3b95f49f10e421 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Thu, 15 Jan 2009 16:28:12 +0000 Subject: log class can now easily use errno and gpg_err --- src/cryptinit.hpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'src/cryptinit.hpp') diff --git a/src/cryptinit.hpp b/src/cryptinit.hpp index 80f4e14..e5bbc08 100644 --- a/src/cryptinit.hpp +++ b/src/cryptinit.hpp @@ -92,18 +92,14 @@ bool initLibGCrypt() gcry_error_t err = gcry_control (GCRYCTL_DISABLE_SECMEM, 0); if( err ) { - char buf[STERROR_TEXT_MAX]; - buf[0] = 0; - std::cout << "initLibGCrypt: Failed to disable secure memory: " << gpg_strerror_r(err, buf, STERROR_TEXT_MAX) << std::endl; + std::cout << "initLibGCrypt: Failed to disable secure memory: " << LogGpgError(err) << std::endl; return false; } // Tell Libgcrypt that initialization has completed. err = gcry_control(GCRYCTL_INITIALIZATION_FINISHED); if( err ) { - char buf[STERROR_TEXT_MAX]; - buf[0] = 0; - std::cout << "initLibGCrypt: Failed to finish initialization: " << gpg_strerror_r(err, buf, STERROR_TEXT_MAX) << std::endl; + std::cout << "initLibGCrypt: Failed to finish initialization: " << LogGpgError(err) << std::endl; return false; } -- cgit v1.2.3