about summary refs log tree commit diff stats
path: root/src/xmpp
diff options
context:
space:
mode:
authorthe xhr <xhr@giessen.ccc.de>2023-01-06 11:48:52 +0100
committerthe xhr <xhr@giessen.ccc.de>2023-01-26 17:39:46 +0100
commit6ceafac6aa050f281375cb5d5bc9856a8309450c (patch)
tree03b7827a0cac49b5d4b33c1d22c4292ec077bac5 /src/xmpp
parent494512c25cabc2271b4132f19ad38fb8edee1afa (diff)
downloadprofani-tty-6ceafac6aa050f281375cb5d5bc9856a8309450c.tar.gz
Check if string is NULL and print placeholder instead
OpenBSD's kernel warns about NULL printfs.  Fix this with a standard check.
Diffstat (limited to 'src/xmpp')
-rw-r--r--src/xmpp/omemo.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/xmpp/omemo.c b/src/xmpp/omemo.c
index c4d82e42..70fdd733 100644
--- a/src/xmpp/omemo.c
+++ b/src/xmpp/omemo.c
@@ -191,7 +191,7 @@ 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);
+    log_debug("[OMEMO] omemo_start_device_session_handle_bundle: %s", (from_attr == NULL) ? "" : from_attr);
 
     const char* type = xmpp_stanza_get_type(stanza);
     if (g_strcmp0(type, "error") == 0) {