From 8ffeab7884820ce410a23464038e6b4a2721a54a Mon Sep 17 00:00:00 2001 From: default Date: Fri, 7 Oct 2022 17:25:40 +0200 Subject: [PATCH] Use xs_is_null() instead of NULL comparison when getting actor's name. --- html.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/html.c b/html.c index 4637a4c..02556d8 100644 --- a/html.c +++ b/html.c @@ -166,8 +166,8 @@ d_char *html_msg_icon(snac *snac, d_char *os, char *msg) char *v; /* get the name */ - if ((v = xs_dict_get(actor, "name")) == NULL || *v == '\0') { - if ((v = xs_dict_get(actor, "preferredUsername")) == NULL) { + if (xs_is_null((v = xs_dict_get(actor, "name"))) || *v == '\0') { + if (xs_is_null(v = xs_dict_get(actor, "preferredUsername"))) { v = "user"; } }