summaryrefslogtreecommitdiffstats
path: root/libkdenetwork/gpgmepp/util.h
diff options
context:
space:
mode:
Diffstat (limited to 'libkdenetwork/gpgmepp/util.h')
-rw-r--r--libkdenetwork/gpgmepp/util.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/libkdenetwork/gpgmepp/util.h b/libkdenetwork/gpgmepp/util.h
index c8786bdc..8246cfc3 100644
--- a/libkdenetwork/gpgmepp/util.h
+++ b/libkdenetwork/gpgmepp/util.h
@@ -28,6 +28,10 @@
#include <iostream>
#endif
+static inline const char * protect( const char * s ) {
+ return s ? s : "<null>" ;
+}
+
static inline gpgme_keylist_mode_t add_to_gpgme_keylist_mode_t( unsigned int oldmode, unsigned int newmodes ) {
if ( newmodes & GpgME::Context::Local ) oldmode |= GPGME_KEYLIST_MODE_LOCAL;
if ( newmodes & GpgME::Context::Extern ) oldmode |= GPGME_KEYLIST_MODE_EXTERN;