diff options
Diffstat (limited to 'src/settings')
-rw-r--r-- | src/settings/nm-agent-manager.c | 2 | ||||
-rw-r--r-- | src/settings/nm-secret-agent.c | 8 | ||||
-rw-r--r-- | src/settings/plugins/ibft/nms-ibft-reader.c | 2 | ||||
-rw-r--r-- | src/settings/plugins/ifcfg-rh/nm-inotify-helper.c | 4 | ||||
-rw-r--r-- | src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c | 16 | ||||
-rw-r--r-- | src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-writer.c | 10 | ||||
-rw-r--r-- | src/settings/plugins/ifcfg-rh/shvar.c | 12 | ||||
-rw-r--r-- | src/settings/plugins/ifcfg-rh/shvar.h | 4 | ||||
-rw-r--r-- | src/settings/plugins/ifupdown/nms-ifupdown-parser.c | 54 | ||||
-rw-r--r-- | src/settings/plugins/keyfile/nms-keyfile-writer.c | 2 | ||||
-rw-r--r-- | src/settings/plugins/keyfile/tests/test-keyfile.c | 4 |
11 files changed, 59 insertions, 59 deletions
diff --git a/src/settings/nm-agent-manager.c b/src/settings/nm-agent-manager.c index 453136e4e7..1836a5e8f9 100644 --- a/src/settings/nm-agent-manager.c +++ b/src/settings/nm-agent-manager.c @@ -642,7 +642,7 @@ req_complete_error (Request *req, GError *error) req_complete (req, NULL, NULL, NULL, error); } -static gint +static int agent_compare_func (gconstpointer aa, gconstpointer bb, gpointer user_data) { NMSecretAgent *a = (NMSecretAgent *)aa; diff --git a/src/settings/nm-secret-agent.c b/src/settings/nm-secret-agent.c index af6d7017bd..836ab21d4a 100644 --- a/src/settings/nm-secret-agent.c +++ b/src/settings/nm-secret-agent.c @@ -648,10 +648,10 @@ _on_disconnected_private_connection (NMDBusManager *mgr, static void _on_disconnected_name_owner_changed (GDBusConnection *connection, - const gchar *sender_name, - const gchar *object_path, - const gchar *interface_name, - const gchar *signal_name, + const char *sender_name, + const char *object_path, + const char *interface_name, + const char *signal_name, GVariant *parameters, gpointer user_data) { diff --git a/src/settings/plugins/ibft/nms-ibft-reader.c b/src/settings/plugins/ibft/nms-ibft-reader.c index cf849e2817..ac5824a167 100644 --- a/src/settings/plugins/ibft/nms-ibft-reader.c +++ b/src/settings/plugins/ibft/nms-ibft-reader.c @@ -98,7 +98,7 @@ nms_ibft_reader_load_blocks (const char *iscsiadm_path, const char *envp[1] = { NULL }; GSList *blocks = NULL; char *out = NULL, *err = NULL; - gint status = 0; + int status = 0; char **lines = NULL, **iter; GPtrArray *block_lines = NULL; gboolean success = FALSE; diff --git a/src/settings/plugins/ifcfg-rh/nm-inotify-helper.c b/src/settings/plugins/ifcfg-rh/nm-inotify-helper.c index 2863df64d5..e7a74a1aea 100644 --- a/src/settings/plugins/ifcfg-rh/nm-inotify-helper.c +++ b/src/settings/plugins/ifcfg-rh/nm-inotify-helper.c @@ -120,8 +120,8 @@ inotify_event_handler (GIOChannel *channel, GIOCondition cond, gpointer user_dat struct inotify_event evt; /* read the notifications from the watch descriptor */ - while (g_io_channel_read_chars (channel, (gchar *) &evt, sizeof (struct inotify_event), NULL, NULL) == G_IO_STATUS_NORMAL) { - gchar filename[PATH_MAX + 1]; + while (g_io_channel_read_chars (channel, (char *) &evt, sizeof (struct inotify_event), NULL, NULL) == G_IO_STATUS_NORMAL) { + char filename[PATH_MAX + 1]; filename[0] = '\0'; if (evt.len > 0) { diff --git a/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c b/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c index c196084638..57394791a6 100644 --- a/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c +++ b/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c @@ -232,12 +232,12 @@ make_connection_setting (const char *file, NM_SETTING_CONNECTION_AUTOCONNECT, svGetValueBoolean (ifcfg, "ONBOOT", TRUE), NM_SETTING_CONNECTION_AUTOCONNECT_PRIORITY, - (gint) svGetValueInt64 (ifcfg, "AUTOCONNECT_PRIORITY", 10, + (int) svGetValueInt64 (ifcfg, "AUTOCONNECT_PRIORITY", 10, NM_SETTING_CONNECTION_AUTOCONNECT_PRIORITY_MIN, NM_SETTING_CONNECTION_AUTOCONNECT_PRIORITY_MAX, NM_SETTING_CONNECTION_AUTOCONNECT_PRIORITY_DEFAULT), NM_SETTING_CONNECTION_AUTOCONNECT_RETRIES, - (gint) svGetValueInt64 (ifcfg, "AUTOCONNECT_RETRIES", 10, + (int) svGetValueInt64 (ifcfg, "AUTOCONNECT_RETRIES", 10, -1, G_MAXINT32, -1), NM_SETTING_CONNECTION_AUTOCONNECT_SLAVES, svGetValueBoolean (ifcfg, "AUTOCONNECT_SLAVES", NM_SETTING_CONNECTION_AUTOCONNECT_SLAVES_DEFAULT), @@ -335,7 +335,7 @@ make_connection_setting (const char *file, } vint64 = svGetValueInt64 (ifcfg, "AUTH_RETRIES", 10, -1, G_MAXINT32, -1); - g_object_set (s_con, NM_SETTING_CONNECTION_AUTH_RETRIES, (gint) vint64, NULL); + g_object_set (s_con, NM_SETTING_CONNECTION_AUTH_RETRIES, (int) vint64, NULL); i_val = NM_SETTING_CONNECTION_MDNS_DEFAULT; if (!svGetValueEnum (ifcfg, "MDNS", @@ -1286,7 +1286,7 @@ make_ip4_setting (shvarFile *ifcfg, shvarFile *route_ifcfg; gboolean never_default; gint64 timeout; - gint priority; + int priority; char inet_buf[NM_UTILS_INET_ADDRSTRLEN]; const char *const *item; guint32 route_table; @@ -1561,7 +1561,7 @@ make_ip4_setting (shvarFile *ifcfg, if (timeout > 0) timeout *= 1000; } - g_object_set (s_ip4, NM_SETTING_IP_CONFIG_DAD_TIMEOUT, (gint) timeout, NULL); + g_object_set (s_ip4, NM_SETTING_IP_CONFIG_DAD_TIMEOUT, (int) timeout, NULL); return g_steal_pointer (&s_ip4); } @@ -1697,7 +1697,7 @@ make_ip6_setting (shvarFile *ifcfg, guint32 i; int i_val; GError *local = NULL; - gint priority; + int priority; gboolean never_default = FALSE; gboolean ip6_privacy = FALSE, ip6_privacy_prefer_public_ip; NMSettingIP6ConfigPrivacy ip6_privacy_val; @@ -3444,7 +3444,7 @@ next: g_object_set (s_8021x, NM_SETTING_802_1X_PHASE2_DOMAIN_SUFFIX_MATCH, v, NULL); timeout = svGetValueInt64 (ifcfg, "IEEE_8021X_AUTH_TIMEOUT", 10, 0, G_MAXINT32, 0); - g_object_set (s_8021x, NM_SETTING_802_1X_AUTH_TIMEOUT, (gint) timeout, NULL); + g_object_set (s_8021x, NM_SETTING_802_1X_AUTH_TIMEOUT, (int) timeout, NULL); return g_steal_pointer (&s_8021x); } @@ -5077,7 +5077,7 @@ make_vlan_setting (shvarFile *ifcfg, const char *v = NULL; int vlan_id = -1; guint32 vlan_flags = 0; - gint gvrp, reorder_hdr; + int gvrp, reorder_hdr; v = svGetValueStr (ifcfg, "VLAN_ID", &value); if (v) { diff --git a/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-writer.c b/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-writer.c index fdb2e10a2e..8921646597 100644 --- a/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-writer.c +++ b/src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-writer.c @@ -1555,7 +1555,7 @@ static void write_dcb_app (shvarFile *ifcfg, const char *tag, NMSettingDcbFlags flags, - gint priority) + int priority) { char prop[NM_STRLEN ("DCB_xxxxxxxxxxxxxxxxxxxxxxx_yyyyyyyyyyyyyyyyyyyy")]; @@ -1725,7 +1725,7 @@ write_connection_setting (NMSettingConnection *s_con, shvarFile *ifcfg) guint32 n, i; GString *str; const char *master, *master_iface = NULL, *type; - gint vint; + int vint; NMSettingConnectionMdns mdns; guint32 vuint32; const char *tmp; @@ -2212,11 +2212,11 @@ write_ip4_setting (NMConnection *connection, const char *value; char *tmp; char tag[64]; - gint j; + int j; guint i, num, n; gint64 route_metric; NMIPRouteTableSyncMode route_table; - gint priority; + int priority; int timeout; GString *searches; const char *method = NULL; @@ -2548,7 +2548,7 @@ write_ip6_setting (NMConnection *connection, NMSettingIPConfig *s_ip4; const char *value; guint i, num, num4; - gint priority; + int priority; NMIPAddress *addr; const char *dns; gint64 route_metric; diff --git a/src/settings/plugins/ifcfg-rh/shvar.c b/src/settings/plugins/ifcfg-rh/shvar.c index 9120b870eb..c739b19dec 100644 --- a/src/settings/plugins/ifcfg-rh/shvar.c +++ b/src/settings/plugins/ifcfg-rh/shvar.c @@ -90,8 +90,8 @@ struct _shvarFile { * * Returns: the parsed boolean value or @fallback. */ -gint -svParseBoolean (const char *value, gint fallback) +int +svParseBoolean (const char *value, int fallback) { if (!value) return fallback; @@ -148,8 +148,8 @@ static char * _escape_ansic (const char *source) { const char *p; - gchar *dest; - gchar *q; + char *dest; + char *q; nm_assert (source); @@ -1044,8 +1044,8 @@ svGetValueStr_cp (shvarFile *s, const char *key) * * Returns: the parsed boolean value or @fallback. */ -gint -svGetValueBoolean (shvarFile *s, const char *key, gint fallback) +int +svGetValueBoolean (shvarFile *s, const char *key, int fallback) { gs_free char *to_free = NULL; const char *value; diff --git a/src/settings/plugins/ifcfg-rh/shvar.h b/src/settings/plugins/ifcfg-rh/shvar.h index dbc4d950a3..838c79cc16 100644 --- a/src/settings/plugins/ifcfg-rh/shvar.h +++ b/src/settings/plugins/ifcfg-rh/shvar.h @@ -56,7 +56,7 @@ char *svGetValue_cp (shvarFile *s, const char *key); const char *svGetValueStr (shvarFile *s, const char *key, char **to_free); char *svGetValueStr_cp (shvarFile *s, const char *key); -gint svParseBoolean (const char *value, gint def); +int svParseBoolean (const char *value, int def); GHashTable *svGetKeys (shvarFile *s); @@ -64,7 +64,7 @@ GHashTable *svGetKeys (shvarFile *s); * return FALSE if <key> resolves to any non-truth value (e.g. "no", "n", "false") * return <def> otherwise */ -gint svGetValueBoolean (shvarFile *s, const char *key, gint def); +int svGetValueBoolean (shvarFile *s, const char *key, int def); gint64 svGetValueInt64 (shvarFile *s, const char *key, guint base, gint64 min, gint64 max, gint64 fallback); diff --git a/src/settings/plugins/ifupdown/nms-ifupdown-parser.c b/src/settings/plugins/ifupdown/nms-ifupdown-parser.c index 884c6591a9..a20f79c1ff 100644 --- a/src/settings/plugins/ifupdown/nms-ifupdown-parser.c +++ b/src/settings/plugins/ifupdown/nms-ifupdown-parser.c @@ -37,12 +37,12 @@ #include "nms-ifupdown-plugin.h" #include "nms-ifupdown-parser.h" -static const gchar* +static const char* _ifupdownplugin_guess_connection_type (if_block *block) { if_data *curr = block->info; - const gchar* ret_type = NULL; - const gchar* value = ifparser_getkey(block, "inet"); + const char* ret_type = NULL; + const char* value = ifparser_getkey(block, "inet"); if(value && !strcmp("ppp", value)) { ret_type = NM_SETTING_PPP_SETTING_NAME; } @@ -63,12 +63,12 @@ _ifupdownplugin_guess_connection_type (if_block *block) } struct _Mapping { - const gchar *domain; + const char *domain; const gpointer target; }; static gpointer -map_by_mapping(struct _Mapping *mapping, const gchar *key) +map_by_mapping(struct _Mapping *mapping, const char *key) { struct _Mapping *curr = mapping; while(curr->domain) { @@ -83,11 +83,11 @@ static void update_wireless_setting_from_if_block(NMConnection *connection, if_block *block) { - gint wpa_l= strlen("wpa-"); - gint wireless_l= strlen("wireless-"); + int wpa_l= strlen("wpa-"); + int wireless_l= strlen("wireless-"); if_data *curr = block->info; - const gchar* value = ifparser_getkey (block, "inet"); + const char* value = ifparser_getkey (block, "inet"); struct _Mapping mapping[] = { {"ssid", "ssid"}, {"essid", "ssid"}, @@ -107,11 +107,11 @@ update_wireless_setting_from_if_block(NMConnection *connection, while(curr) { if(strlen(curr->key) > wireless_l && !strncmp("wireless-", curr->key, wireless_l)) { - const gchar* newkey = map_by_mapping(mapping, curr->key+wireless_l); + const char* newkey = map_by_mapping(mapping, curr->key+wireless_l); nm_log_info (LOGD_SETTINGS, "wireless setting key: %s='%s'", newkey, curr->data); if(newkey && !strcmp("ssid", newkey)) { GBytes *ssid; - gint len = strlen(curr->data); + int len = strlen(curr->data); ssid = g_bytes_new (curr->data, len); g_object_set (wireless_setting, NM_SETTING_WIRELESS_SSID, ssid, NULL); @@ -133,11 +133,11 @@ update_wireless_setting_from_if_block(NMConnection *connection, } } else if(strlen(curr->key) > wpa_l && !strncmp("wpa-", curr->key, wpa_l)) { - const gchar* newkey = map_by_mapping(mapping, curr->key+wpa_l); + const char* newkey = map_by_mapping(mapping, curr->key+wpa_l); if(newkey && !strcmp("ssid", newkey)) { GBytes *ssid; - gint len = strlen(curr->data); + int len = strlen(curr->data); ssid = g_bytes_new (curr->data, len); g_object_set (wireless_setting, NM_SETTING_WIRELESS_SSID, ssid, NULL); @@ -156,8 +156,8 @@ update_wireless_setting_from_if_block(NMConnection *connection, nm_connection_add_setting(connection, (NMSetting*) wireless_setting); } -typedef gchar* (*IfupdownStrDupeFunc) (gpointer value, gpointer data); -typedef gpointer (*IfupdownStrToTypeFunc) (const gchar* value); +typedef char* (*IfupdownStrDupeFunc) (gpointer value, gpointer data); +typedef gpointer (*IfupdownStrToTypeFunc) (const char* value); static char* normalize_dupe_wireless_key (gpointer value, gpointer data) { @@ -203,24 +203,24 @@ static char *normalize_psk (gpointer value, gpointer data) } static gpointer -string_to_gpointerint(const gchar* data) +string_to_gpointerint(const char* data) { - gint result = (gint) strtol (data, NULL, 10); + int result = (int) strtol (data, NULL, 10); return GINT_TO_POINTER(result); } static gpointer -string_to_glist_of_strings(const gchar* data) +string_to_glist_of_strings(const char* data) { GSList *ret = NULL; - gchar *string = (gchar*) data; + char *string = (char*) data; while(string) { - gchar* next = NULL; + char* next = NULL; if( (next = strchr(string, ' ')) || (next = strchr(string, '\t')) || (next = strchr(string, '\0')) ) { - gchar *part = g_strndup(string, (next - string)); + char *part = g_strndup(string, (next - string)); ret = g_slist_append(ret, part); if (*next) string = next+1; @@ -243,10 +243,10 @@ static void update_wireless_security_setting_from_if_block(NMConnection *connection, if_block *block) { - gint wpa_l= strlen("wpa-"); - gint wireless_l= strlen("wireless-"); + int wpa_l= strlen("wpa-"); + int wireless_l= strlen("wireless-"); if_data *curr = block->info; - const gchar* value = ifparser_getkey (block, "inet"); + const char* value = ifparser_getkey (block, "inet"); struct _Mapping mapping[] = { {"psk", "psk"}, {"identity", "leap-username"}, @@ -317,9 +317,9 @@ update_wireless_security_setting_from_if_block(NMConnection *connection, if(strlen(curr->key) > wireless_l && !strncmp("wireless-", curr->key, wireless_l)) { - gchar *property_value = NULL; + char *property_value = NULL; gpointer typed_property_value = NULL; - const gchar* newkey = map_by_mapping(mapping, curr->key+wireless_l); + const char* newkey = map_by_mapping(mapping, curr->key+wireless_l); IfupdownStrDupeFunc dupe_func = map_by_mapping (dupe_mapping, curr->key+wireless_l); IfupdownStrToTypeFunc type_map_func = map_by_mapping (type_mapping, curr->key+wireless_l); GFreeFunc free_func = map_by_mapping (free_type_mapping, curr->key+wireless_l); @@ -350,9 +350,9 @@ update_wireless_security_setting_from_if_block(NMConnection *connection, } else if(strlen(curr->key) > wpa_l && !strncmp("wpa-", curr->key, wpa_l)) { - gchar *property_value = NULL; + char *property_value = NULL; gpointer typed_property_value = NULL; - const gchar* newkey = map_by_mapping(mapping, curr->key+wpa_l); + const char* newkey = map_by_mapping(mapping, curr->key+wpa_l); IfupdownStrDupeFunc dupe_func = map_by_mapping (dupe_mapping, curr->key+wpa_l); IfupdownStrToTypeFunc type_map_func = map_by_mapping (type_mapping, curr->key+wpa_l); GFreeFunc free_func = map_by_mapping (free_type_mapping, curr->key+wpa_l); diff --git a/src/settings/plugins/keyfile/nms-keyfile-writer.c b/src/settings/plugins/keyfile/nms-keyfile-writer.c index 270a217e29..228f4d4469 100644 --- a/src/settings/plugins/keyfile/nms-keyfile-writer.c +++ b/src/settings/plugins/keyfile/nms-keyfile-writer.c @@ -127,7 +127,7 @@ cert_writer (NMConnection *connection, new_path = g_strdup_printf ("%s/%s-%s.%s", info->keyfile_dir, nm_connection_get_uuid (connection), cert_data->vtable->file_suffix, ext); - success = nm_utils_file_set_contents (new_path, (const gchar *) blob_data, + success = nm_utils_file_set_contents (new_path, (const char *) blob_data, blob_len, 0600, &local); if (success) { /* Write the path value to the keyfile. diff --git a/src/settings/plugins/keyfile/tests/test-keyfile.c b/src/settings/plugins/keyfile/tests/test-keyfile.c index a3045f7dfc..20e9b0237d 100644 --- a/src/settings/plugins/keyfile/tests/test-keyfile.c +++ b/src/settings/plugins/keyfile/tests/test-keyfile.c @@ -960,7 +960,7 @@ test_write_intlist_ssid (void) unsigned char tmpssid[] = { 65, 49, 50, 51, 0, 50, 50 }; gs_free_error GError *error = NULL; gs_unref_keyfile GKeyFile *keyfile = NULL; - gint *intlist; + int *intlist; gsize len = 0, i; connection = nm_simple_connection_new (); @@ -2186,7 +2186,7 @@ test_write_new_wired_group_name (void) gs_free char *testfile = NULL; gs_free_error GError *error = NULL; char *s; - gint mtu; + int mtu; connection = nm_simple_connection_new (); g_assert (connection); |