mirror of
https://github.com/profanity-im/profanity.git
synced 2024-11-03 19:37:16 -05:00
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:
parent
494512c25c
commit
6ceafac6aa
@ -553,7 +553,7 @@ omemo_prekeys(GList** prekeys, GList** ids, GList** lengths)
|
||||
void
|
||||
omemo_set_device_list(const char* const from, GList* device_list)
|
||||
{
|
||||
log_debug("[OMEMO] Setting device list for %s", from);
|
||||
log_debug("[OMEMO] Setting device list for %s", (from == NULL) ? "" : from);
|
||||
Jid* jid;
|
||||
if (from) {
|
||||
jid = jid_create(from);
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user