mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-30 16:26:22 +00:00
Cleanup g_strfreev() to auto_gcharv
Include some additional minor cleanups
This commit is contained in:
@@ -378,7 +378,7 @@ _caps_by_ver(const char* const ver)
|
||||
auto_gchar gchar* os_version = g_key_file_get_string(cache, ver, "os_version", NULL);
|
||||
|
||||
gsize features_len = 0;
|
||||
gchar** features_list = g_key_file_get_string_list(cache, ver, "features", &features_len, NULL);
|
||||
auto_gcharv gchar** features_list = g_key_file_get_string_list(cache, ver, "features", &features_len, NULL);
|
||||
GSList* features = NULL;
|
||||
if (features_list && features_len > 0) {
|
||||
for (int i = 0; i < features_len; i++) {
|
||||
@@ -391,9 +391,6 @@ _caps_by_ver(const char* const ver)
|
||||
software, software_version, os, os_version,
|
||||
features);
|
||||
|
||||
if (features_list) {
|
||||
g_strfreev(features_list);
|
||||
}
|
||||
g_slist_free(features);
|
||||
|
||||
return result;
|
||||
|
||||
@@ -877,7 +877,7 @@ _caps_response_id_handler(xmpp_stanza_t* const stanza, void* const userdata)
|
||||
}
|
||||
|
||||
// validate sha1
|
||||
gchar** split = g_strsplit(node, "#", -1);
|
||||
auto_gcharv gchar** split = g_strsplit(node, "#", -1);
|
||||
char* given_sha1 = split[1];
|
||||
auto_gchar gchar* generated_sha1 = stanza_create_caps_sha1_from_query(query);
|
||||
|
||||
@@ -901,8 +901,6 @@ _caps_response_id_handler(xmpp_stanza_t* const stanza, void* const userdata)
|
||||
caps_map_jid_to_ver(from, given_sha1);
|
||||
}
|
||||
|
||||
g_strfreev(split);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -1350,7 +1350,7 @@ _vcard_photo_result(xmpp_stanza_t* const stanza, void* userdata)
|
||||
}
|
||||
|
||||
if (data->open) {
|
||||
gchar** argv;
|
||||
auto_gcharv gchar** argv;
|
||||
gint argc;
|
||||
|
||||
auto_gchar gchar* cmdtemplate = prefs_get_string(PREF_VCARD_PHOTO_CMD);
|
||||
@@ -1366,7 +1366,6 @@ _vcard_photo_result(xmpp_stanza_t* const stanza, void* userdata)
|
||||
if (!call_external(argv)) {
|
||||
cons_show_error("Unable to execute command");
|
||||
}
|
||||
g_strfreev(argv);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user