mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-11-22 21:35:04 +00:00
Use xs_is_null() instead of NULL comparison when getting actor's name.
This commit is contained in:
parent
d79591c277
commit
8ffeab7884
1 changed files with 2 additions and 2 deletions
4
html.c
4
html.c
|
@ -166,8 +166,8 @@ d_char *html_msg_icon(snac *snac, d_char *os, char *msg)
|
||||||
char *v;
|
char *v;
|
||||||
|
|
||||||
/* get the name */
|
/* get the name */
|
||||||
if ((v = xs_dict_get(actor, "name")) == NULL || *v == '\0') {
|
if (xs_is_null((v = xs_dict_get(actor, "name"))) || *v == '\0') {
|
||||||
if ((v = xs_dict_get(actor, "preferredUsername")) == NULL) {
|
if (xs_is_null(v = xs_dict_get(actor, "preferredUsername"))) {
|
||||||
v = "user";
|
v = "user";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue