Browse Source

Use xs_is_null() instead of NULL comparison when getting actor's name.

default 3 years ago
parent
commit
8ffeab7884
1 changed files with 2 additions and 2 deletions
  1. 2 2
      html.c

+ 2 - 2
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";
             }
         }