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