diff options
Diffstat (limited to 'libkdenetwork/gpgmepp/util.h')
-rw-r--r-- | libkdenetwork/gpgmepp/util.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libkdenetwork/gpgmepp/util.h b/libkdenetwork/gpgmepp/util.h index c8786bdcb..8246cfc32 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; |