1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-06-16 21:35:24 +00:00

iq: initialize os and os_txt

Let's set this to NULL.

Someone was using `picaur` and got an error about potential
uninitialization. Even though the code is fine let's set this to NULL to
make the compiler happy.

The strange thing was that building manually on the same system worked.

Related to 2e43b0ae62.
This commit is contained in:
Michael Vetter 2023-04-11 20:11:34 +02:00
parent 93fa8467ef
commit ef3810638f

View File

@ -1651,8 +1651,8 @@ _version_get_handler(xmpp_stanza_t* const stanza)
xmpp_stanza_add_child(name, name_txt);
xmpp_stanza_add_child(query, name);
bool include_os = prefs_get_boolean(PREF_REVEAL_OS) && !is_custom_client;
xmpp_stanza_t* os;
xmpp_stanza_t* os_txt;
xmpp_stanza_t* os = NULL;
xmpp_stanza_t* os_txt = NULL;
xmpp_stanza_t* version = xmpp_stanza_new(ctx);
xmpp_stanza_set_name(version, "version");
xmpp_stanza_t* version_txt = xmpp_stanza_new(ctx);