diff options
| author | Michael Biebl <biebl@debian.org> | 2018-09-23 10:10:27 +0200 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2018-09-23 10:10:27 +0200 |
| commit | e126f3e804c35480c4f075777430419d6ece23da (patch) | |
| tree | 5d5821ebcda8cd6ac34d2483bb3354910e508930 /libnm-util/nm-utils.c | |
| parent | c240974325c552cad177c457d6ff04e381fd77a3 (diff) | |
New upstream version 1.12.4 upstream/1.12.4
Diffstat (limited to 'libnm-util/nm-utils.c')
| -rw-r--r-- | libnm-util/nm-utils.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/libnm-util/nm-utils.c b/libnm-util/nm-utils.c index 054d69f4..2af9432f 100644 --- a/libnm-util/nm-utils.c +++ b/libnm-util/nm-utils.c @@ -295,8 +295,8 @@ nm_utils_ssid_to_utf8 (const GByteArray *ssid) g_return_val_if_fail (ssid != NULL, NULL); - if (g_utf8_validate ((const char *) ssid->data, ssid->len, NULL)) - return g_strndup ((const char *) ssid->data, ssid->len); + if (g_utf8_validate ((const gchar *) ssid->data, ssid->len, NULL)) + return g_strndup ((const gchar *) ssid->data, ssid->len); /* LANG may be a good encoding hint */ g_get_charset ((const char **)(&e1)); @@ -311,15 +311,15 @@ nm_utils_ssid_to_utf8 (const GByteArray *ssid) g_free (lang); } - converted = g_convert ((const char *) ssid->data, ssid->len, "UTF-8", e1, NULL, NULL, NULL); + converted = g_convert ((const gchar *) ssid->data, ssid->len, "UTF-8", e1, NULL, NULL, NULL); if (!converted && e2) - converted = g_convert ((const char *) ssid->data, ssid->len, "UTF-8", e2, NULL, NULL, NULL); + converted = g_convert ((const gchar *) ssid->data, ssid->len, "UTF-8", e2, NULL, NULL, NULL); if (!converted && e3) - converted = g_convert ((const char *) ssid->data, ssid->len, "UTF-8", e3, NULL, NULL, NULL); + converted = g_convert ((const gchar *) ssid->data, ssid->len, "UTF-8", e3, NULL, NULL, NULL); if (!converted) { - converted = g_convert_with_fallback ((const char *) ssid->data, ssid->len, + converted = g_convert_with_fallback ((const gchar *) ssid->data, ssid->len, "UTF-8", e1, "?", NULL, NULL, NULL); } @@ -330,11 +330,11 @@ nm_utils_ssid_to_utf8 (const GByteArray *ssid) */ /* Use the printable range of 0x20-0x7E */ - char *valid_chars = " !\"#$%&'()*+,-./0123456789:;<=>?@" + gchar *valid_chars = " !\"#$%&'()*+,-./0123456789:;<=>?@" "ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`" "abcdefghijklmnopqrstuvwxyz{|}~"; - converted = g_strndup ((const char *)ssid->data, ssid->len); + converted = g_strndup ((const gchar *)ssid->data, ssid->len); g_strcanon (converted, valid_chars, '?'); } @@ -491,7 +491,7 @@ nm_utils_gvalue_hash_dup (GHashTable *hash) g_return_val_if_fail (hash != NULL, NULL); table = g_hash_table_new_full (g_str_hash, g_str_equal, - g_free, + (GDestroyNotify) g_free, value_destroy); g_hash_table_foreach (hash, value_dup, table); |