1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-06-16 21:35:24 +00: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:
the xhr 2023-01-06 11:48:52 +01:00
parent 494512c25c
commit 6ceafac6aa
2 changed files with 2 additions and 2 deletions

View File

@ -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);

View File

@ -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) {