From 6ceafac6aa050f281375cb5d5bc9856a8309450c Mon Sep 17 00:00:00 2001 From: the xhr Date: Fri, 6 Jan 2023 11:48:52 +0100 Subject: Check if string is NULL and print placeholder instead OpenBSD's kernel warns about NULL printfs. Fix this with a standard check. --- src/xmpp/omemo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/xmpp') 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) { -- cgit 1.4.1-2-gfad0