Check if string is NULL and print placeholder instead
OpenBSD's kernel warns about NULL printfs. Fix this with a standard check.
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user