summaryrefslogtreecommitdiff
path: root/html.c
diff options
context:
space:
mode:
authorGravatar default2022-10-07 17:25:40 +0200
committerGravatar default2022-10-07 17:25:40 +0200
commit8ffeab7884820ce410a23464038e6b4a2721a54a (patch)
tree3124b80c9ee8110a9067d7e0913eed62da2784f7 /html.c
parentBackport from xs. (diff)
downloadsnac2-8ffeab7884820ce410a23464038e6b4a2721a54a.tar.gz
snac2-8ffeab7884820ce410a23464038e6b4a2721a54a.tar.xz
snac2-8ffeab7884820ce410a23464038e6b4a2721a54a.zip
Use xs_is_null() instead of NULL comparison when getting actor's name.
Diffstat (limited to 'html.c')
-rw-r--r--html.c4
1 files 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)
166 char *v; 166 char *v;
167 167
168 /* get the name */ 168 /* get the name */
169 if ((v = xs_dict_get(actor, "name")) == NULL || *v == '\0') { 169 if (xs_is_null((v = xs_dict_get(actor, "name"))) || *v == '\0') {
170 if ((v = xs_dict_get(actor, "preferredUsername")) == NULL) { 170 if (xs_is_null(v = xs_dict_get(actor, "preferredUsername"))) {
171 v = "user"; 171 v = "user";
172 } 172 }
173 } 173 }