diff options
author | the xhr <xhr@giessen.ccc.de> | 2023-01-09 17:58:01 +0100 |
---|---|---|
committer | the xhr <xhr@giessen.ccc.de> | 2023-01-26 17:42:52 +0100 |
commit | 714add207b26e8d80e3ca945f111bfd5d6027c88 (patch) | |
tree | 09050b504c7d9cfc14c9e761efdfa888c9d0389c /src/xmpp/omemo.c | |
parent | 6ceafac6aa050f281375cb5d5bc9856a8309450c (diff) | |
download | profani-tty-714add207b26e8d80e3ca945f111bfd5d6027c88.tar.gz |
Add macro for possible NULL prints and use it on known sports
The macro is effective on OpenBSD and basically a no op on other platforms. Use it for one existing and the other known debug statements.
Diffstat (limited to 'src/xmpp/omemo.c')
-rw-r--r-- | src/xmpp/omemo.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/xmpp/omemo.c b/src/xmpp/omemo.c index 70fdd733..e1bdbc3e 100644 --- a/src/xmpp/omemo.c +++ b/src/xmpp/omemo.c @@ -191,11 +191,11 @@ omemo_start_device_session_handle_bundle(xmpp_stanza_t* const stanza, void* cons char* from = NULL; const char* from_attr = xmpp_stanza_get_attribute(stanza, STANZA_ATTR_FROM); - log_debug("[OMEMO] omemo_start_device_session_handle_bundle: %s", (from_attr == NULL) ? "" : from_attr); + log_debug("[OMEMO] omemo_start_device_session_handle_bundle: %s", STR_MAYBE_NULL(from_attr)); const char* type = xmpp_stanza_get_type(stanza); if (g_strcmp0(type, "error") == 0) { - log_error("[OMEMO] Error to get key for a device from : %s", from_attr); + log_error("[OMEMO] Error to get key for a device from : %s", STR_MAYBE_NULL(from_attr)); } if (!from_attr) { |