mirror of
https://github.com/profanity-im/profanity.git
synced 2024-12-04 14:46:46 -05:00
Use null check convention in form.c
This commit is contained in:
parent
af75bc4be6
commit
cbcf476a7c
@ -211,7 +211,7 @@ form_create(xmpp_stanza_t * const form_stanza)
|
||||
|
||||
field->var = _get_attr(field_stanza, "var");
|
||||
|
||||
if (field->type_t != FIELD_HIDDEN && field->var != NULL) {
|
||||
if (field->type_t != FIELD_HIDDEN && field->var) {
|
||||
GString *tag = g_string_new("");
|
||||
g_string_printf(tag, "field%d", tag_num++);
|
||||
g_hash_table_insert(form->var_to_tag, strdup(field->var), strdup(tag->str));
|
||||
|
Loading…
Reference in New Issue
Block a user