summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2018-07-11 07:40:19 +0200
committerThomas Haller <thaller@redhat.com>2018-07-11 12:02:06 +0200
commite1c7a2b5d0b142a3d4347ec6f1934f53c4b402a9 (patch)
treef61f41729ed8844d566eb68c69d9550a07564215
parent7e98b4cad2ff9934d8b5855b291c2baaa7543801 (diff)
downloadNetworkManager-e1c7a2b5d0b142a3d4347ec6f1934f53c4b402a9.tar.gz
all: don't use gchar/gshort/gint/glong but C types
We commonly don't use the glib typedefs for char/short/int/long, but their C types directly. $ git grep '\<g\(char\|short\|int\|long\|float\|double\)\>' | wc -l 587 $ git grep '\<\(char\|short\|int\|long\|float\|double\)\>' | wc -l 21114 One could argue that using the glib typedefs is preferable in public API (of our glib based libnm library) or where it clearly is related to glib, like during g_object_set (obj, PROPERTY, (gint) value, NULL); However, that argument does not seem strong, because in practice we don't follow that argument today, and seldomly use the glib typedefs. Also, the style guide for this would be hard to formalize, because "using them where clearly related to a glib" is a very loose suggestion. Also note that glib typedefs will always just be typedefs of the underlying C types. There is no danger of glib changing the meaning of these typedefs (because that would be a major API break of glib). A simple style guide is instead: don't use these typedefs. No manual actions, I only ran the bash script: FILES=($(git ls-files '*.[hc]')) sed -i \ -e 's/\<g\(char\|short\|int\|long\|float\|double\)\>\( [^ ]\)/\1\2/g' \ -e 's/\<g\(char\|short\|int\|long\|float\|double\)\> /\1 /g' \ -e 's/\<g\(char\|short\|int\|long\|float\|double\)\>/\1/g' \ "${FILES[@]}"
-rw-r--r--clients/cli/connections.c34
-rw-r--r--clients/cli/devices.c2
-rw-r--r--clients/common/nm-meta-setting-desc.c4
-rw-r--r--clients/common/nm-polkit-listener.c2
-rw-r--r--clients/common/nm-secret-agent-simple.c26
-rw-r--r--clients/tui/nm-editor-bindings.c22
-rw-r--r--clients/tui/nm-editor-bindings.h20
-rw-r--r--clients/tui/nm-editor-utils.c4
-rw-r--r--clients/tui/nmt-page-ip-tunnel.c2
-rw-r--r--dispatcher/nm-dispatcher.c14
-rw-r--r--dispatcher/tests/test-dispatcher-envp.c2
-rw-r--r--examples/C/glib/monitor-nm-running-gdbus.c6
-rw-r--r--examples/C/glib/monitor-nm-state-gdbus.c6
-rw-r--r--libnm-core/crypto_nss.c2
-rw-r--r--libnm-core/nm-core-internal.h4
-rw-r--r--libnm-core/nm-dbus-utils.c6
-rw-r--r--libnm-core/nm-keyfile-utils.c14
-rw-r--r--libnm-core/nm-keyfile-utils.h12
-rw-r--r--libnm-core/nm-keyfile.c22
-rw-r--r--libnm-core/nm-property-compare.c8
-rw-r--r--libnm-core/nm-setting-8021x.c4
-rw-r--r--libnm-core/nm-setting-8021x.h2
-rw-r--r--libnm-core/nm-setting-bond.c2
-rw-r--r--libnm-core/nm-setting-connection.c12
-rw-r--r--libnm-core/nm-setting-connection.h6
-rw-r--r--libnm-core/nm-setting-dcb.c14
-rw-r--r--libnm-core/nm-setting-dcb.h6
-rw-r--r--libnm-core/nm-setting-ip-config.c14
-rw-r--r--libnm-core/nm-setting-ip-config.h8
-rw-r--r--libnm-core/nm-setting-private.h2
-rw-r--r--libnm-core/nm-setting-team-port.c8
-rw-r--r--libnm-core/nm-setting-team-port.h8
-rw-r--r--libnm-core/nm-setting-team.c44
-rw-r--r--libnm-core/nm-setting-team.h30
-rw-r--r--libnm-core/nm-setting-vlan.c4
-rw-r--r--libnm-core/nm-setting.c4
-rw-r--r--libnm-core/nm-setting.h2
-rw-r--r--libnm-core/nm-utils.c12
-rw-r--r--libnm-core/nm-utils.h2
-rw-r--r--libnm-core/tests/test-general.c8
-rw-r--r--libnm-glib/libnm-glib-test.c2
-rw-r--r--libnm-glib/nm-access-point.c4
-rw-r--r--libnm-glib/nm-access-point.h2
-rw-r--r--libnm-glib/nm-device-wimax.c12
-rw-r--r--libnm-glib/nm-device-wimax.h6
-rw-r--r--libnm-glib/nm-object.c2
-rw-r--r--libnm-glib/nm-vpn-plugin-utils.c2
-rw-r--r--libnm-util/crypto_nss.c2
-rw-r--r--libnm-util/nm-param-spec-specialized.c64
-rw-r--r--libnm-util/nm-setting-bond.c2
-rw-r--r--libnm-util/nm-setting-dcb.c14
-rw-r--r--libnm-util/nm-setting-dcb.h6
-rw-r--r--libnm-util/nm-setting-private.h6
-rw-r--r--libnm-util/nm-setting-vlan.c2
-rw-r--r--libnm-util/nm-setting.c10
-rw-r--r--libnm-util/nm-setting.h2
-rw-r--r--libnm-util/nm-utils.c16
-rw-r--r--libnm/nm-access-point.c6
-rw-r--r--libnm/nm-access-point.h2
-rw-r--r--libnm/nm-client.c6
-rw-r--r--libnm/nm-dbus-helpers.c2
-rw-r--r--libnm/nm-device-wimax.c12
-rw-r--r--libnm/nm-device-wimax.h6
-rw-r--r--libnm/nm-dns-manager.c2
-rw-r--r--libnm/nm-object.c12
-rw-r--r--libnm/nm-vpn-service-plugin.c12
-rw-r--r--libnm/tests/test-secret-agent.c8
-rw-r--r--shared/nm-test-utils-impl.c2
-rw-r--r--shared/nm-utils/nm-enum-utils.c4
-rw-r--r--shared/nm-utils/nm-enum-utils.h2
-rw-r--r--shared/nm-utils/nm-glib.h18
-rw-r--r--shared/nm-utils/nm-macros-internal.h2
-rw-r--r--shared/nm-utils/nm-shared-utils.c16
-rw-r--r--shared/nm-utils/nm-shared-utils.h10
-rw-r--r--shared/nm-utils/nm-test-utils.h18
-rw-r--r--src/devices/bluetooth/nm-bluez-manager.c4
-rw-r--r--src/devices/bluetooth/nm-bluez5-manager.c8
-rw-r--r--src/devices/nm-device.c14
-rw-r--r--src/devices/team/nm-device-team.c12
-rw-r--r--src/devices/wifi/nm-device-iwd.c40
-rw-r--r--src/devices/wifi/nm-device-wifi.c2
-rw-r--r--src/devices/wifi/nm-iwd-manager.c28
-rw-r--r--src/devices/wifi/nm-iwd-manager.h4
-rw-r--r--src/devices/wifi/nm-wifi-ap.c2
-rw-r--r--src/devices/wifi/nm-wifi-utils.c2
-rw-r--r--src/devices/wifi/nm-wifi-utils.h2
-rw-r--r--src/devices/wifi/tests/test-general.c6
-rw-r--r--src/devices/wwan/nm-modem-broadband.c14
-rw-r--r--src/devices/wwan/nm-modem-manager.c14
-rw-r--r--src/devices/wwan/nm-modem-ofono.c4
-rw-r--r--src/devices/wwan/nm-modem.c2
-rw-r--r--src/devices/wwan/nm-modem.h2
-rw-r--r--src/dhcp/nm-dhcp-client.c4
-rw-r--r--src/dhcp/nm-dhcp-client.h2
-rw-r--r--src/dhcp/nm-dhcp-dhclient.c2
-rw-r--r--src/dhcp/nm-dhcp-dhcpcanon.c2
-rw-r--r--src/dhcp/nm-dhcp-dhcpcd.c2
-rw-r--r--src/dhcp/nm-dhcp-utils.c2
-rw-r--r--src/dns/nm-dns-dnsmasq.c2
-rw-r--r--src/dns/nm-dns-manager.c8
-rw-r--r--src/dns/nm-dns-plugin.c4
-rw-r--r--src/dns/nm-dns-plugin.h2
-rw-r--r--src/dnsmasq/nm-dnsmasq-manager.c4
-rw-r--r--src/main-utils.c2
-rw-r--r--src/nm-auth-subject.c4
-rw-r--r--src/nm-config-data.c10
-rw-r--r--src/nm-config-data.h6
-rw-r--r--src/nm-config.c14
-rw-r--r--src/nm-config.h8
-rw-r--r--src/nm-connectivity.c2
-rw-r--r--src/nm-core-utils.c24
-rw-r--r--src/nm-core-utils.h4
-rw-r--r--src/nm-dcb.c2
-rw-r--r--src/nm-hostname-manager.c4
-rw-r--r--src/nm-ip4-config.c12
-rw-r--r--src/nm-ip4-config.h6
-rw-r--r--src/nm-ip6-config.c10
-rw-r--r--src/nm-ip6-config.h4
-rw-r--r--src/nm-logging.c8
-rw-r--r--src/nm-manager.c6
-rw-r--r--src/nm-rfkill-manager.c4
-rw-r--r--src/nm-sleep-monitor.c2
-rw-r--r--src/platform/nm-linux-platform.c10
-rw-r--r--src/platform/nm-platform.c2
-rw-r--r--src/platform/tests/test-common.h2
-rw-r--r--src/platform/tests/test-link.c2
-rw-r--r--src/ppp/nm-ppp-manager.c6
-rw-r--r--src/settings/nm-agent-manager.c2
-rw-r--r--src/settings/nm-secret-agent.c8
-rw-r--r--src/settings/plugins/ibft/nms-ibft-reader.c2
-rw-r--r--src/settings/plugins/ifcfg-rh/nm-inotify-helper.c4
-rw-r--r--src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c16
-rw-r--r--src/settings/plugins/ifcfg-rh/nms-ifcfg-rh-writer.c10
-rw-r--r--src/settings/plugins/ifcfg-rh/shvar.c12
-rw-r--r--src/settings/plugins/ifcfg-rh/shvar.h4
-rw-r--r--src/settings/plugins/ifupdown/nms-ifupdown-parser.c54
-rw-r--r--src/settings/plugins/keyfile/nms-keyfile-writer.c2
-rw-r--r--src/settings/plugins/keyfile/tests/test-keyfile.c4
-rw-r--r--src/supplicant/nm-supplicant-config.c2
-rw-r--r--src/supplicant/nm-supplicant-settings-verify.c2
-rw-r--r--src/systemd/nm-sd.c2
-rw-r--r--src/tests/test-general.c2
-rw-r--r--src/vpn/nm-vpn-connection.h2
143 files changed, 587 insertions, 587 deletions
diff --git a/clients/cli/connections.c b/clients/cli/connections.c
index 0e286d7c05..c8af47c0f6 100644
--- a/clients/cli/connections.c
+++ b/clients/cli/connections.c
@@ -249,7 +249,7 @@ enum VpnDataItem {
VPN_DATA_ITEM_USERNAME
};
-static const gchar *
+static const char *
get_vpn_data_item (NMConnection *connection, enum VpnDataItem vpn_data_item)
{
const char *type;
@@ -3218,7 +3218,7 @@ get_valid_properties_string (const NMMetaSettingValidPartItem *const*array,
/* Search the array with the arguments of the current property */
for (j = 0; j < setting_info->properties_num; j++) {
- gchar *new;
+ char *new;
const char *arg_name;
arg_name = setting_info->properties[j]->property_name;
@@ -3702,7 +3702,7 @@ static const OptionInfo *_meta_abstract_get_option_info (const NMMetaAbstractInf
* The questionnaire (for --ask) will ask for them.
*/
static void
-enable_options (const gchar *setting_name, const gchar *property, const gchar * const *opts)
+enable_options (const char *setting_name, const char *property, const char * const *opts)
{
const NMMetaPropertyInfo *property_info;
@@ -3740,7 +3740,7 @@ enable_options (const gchar *setting_name, const gchar *property, const gchar *
* The questionnaire (for --ask) will not ask for them.
*/
static void
-disable_options (const gchar *setting_name, const gchar *property)
+disable_options (const char *setting_name, const char *property)
{
const NMMetaPropertyInfo *property_infos_local[2];
const NMMetaPropertyInfo *const*property_infos;
@@ -3898,7 +3898,7 @@ set_property (NMConnection *connection,
}
static gboolean
-set_option (NmCli *nmc, NMConnection *connection, const NMMetaAbstractInfo *abstract_info, const gchar *value, GError **error)
+set_option (NmCli *nmc, NMConnection *connection, const NMMetaAbstractInfo *abstract_info, const char *value, GError **error)
{
const char *setting_name, *property_name, *option_name;
NMMetaPropertyInfFlags inf_flags;
@@ -4022,7 +4022,7 @@ set_connection_type (NmCli *nmc, NMConnection *con, const OptionInfo *option, co
const NMMetaSettingValidPartItem *const*type_settings;
const NMMetaSettingValidPartItem *const*slv_settings;
GError *local = NULL;
- const gchar *master[] = { "master", NULL };
+ const char *master[] = { "master", NULL };
const char *slave_type = NULL;
value = check_valid_name_toplevel (value, &slave_type, &local);
@@ -4130,7 +4130,7 @@ set_bond_option (NmCli *nmc, NMConnection *con, const OptionInfo *option, const
return FALSE;
if (g_strcmp0 (value, "active-backup") == 0) {
- const gchar *primary[] = { "primary", NULL };
+ const char *primary[] = { "primary", NULL };
enable_options (NM_SETTING_BOND_SETTING_NAME, NM_SETTING_BOND_OPTIONS, primary);
}
@@ -4165,9 +4165,9 @@ static gboolean
set_bond_monitoring_mode (NmCli *nmc, NMConnection *con, const OptionInfo *option, const char *value, GError **error)
{
NMSettingBond *s_bond;
- gs_free gchar *monitor_mode = NULL;
- const gchar *miimon_opts[] = { "miimon", "downdelay", "updelay", NULL };
- const gchar *arp_opts[] = { "arp-interval", "arp-ip-target", NULL };
+ gs_free char *monitor_mode = NULL;
+ const char *miimon_opts[] = { "miimon", "downdelay", "updelay", NULL };
+ const char *arp_opts[] = { "arp-interval", "arp-ip-target", NULL };
s_bond = nm_connection_get_setting_bond (con);
g_return_val_if_fail (s_bond, FALSE);
@@ -4336,8 +4336,8 @@ option_relevant (NMConnection *connection, const NMMetaAbstractInfo *abstract_in
static void
complete_property_name (NmCli *nmc, NMConnection *connection,
char modifier,
- const gchar *prefix,
- const gchar *postfix)
+ const char *prefix,
+ const char *postfix)
{
NMSettingConnection *s_con;
const NMMetaSettingValidPartItem *const*valid_settings_main;
@@ -4412,7 +4412,7 @@ run_rl_generator (rl_compentry_func_t *generator_func, const char *prefix)
}
static gboolean
-complete_option (const NMMetaAbstractInfo *abstract_info, const gchar *prefix, NMConnection *context_connection)
+complete_option (const NMMetaAbstractInfo *abstract_info, const char *prefix, NMConnection *context_connection)
{
const OptionInfo *candidate;
const char *const*values;
@@ -4443,7 +4443,7 @@ complete_option (const NMMetaAbstractInfo *abstract_info, const gchar *prefix, N
}
static void
-complete_property (const gchar *setting_name, const gchar *property, const gchar *prefix, NMConnection *connection)
+complete_property (const char *setting_name, const char *property, const char *prefix, NMConnection *connection)
{
const NMMetaPropertyInfo *property_info;
@@ -4497,7 +4497,7 @@ nmc_read_connection_properties (NmCli *nmc,
/* Go through arguments and set properties */
do {
const NMMetaAbstractInfo *chosen = NULL;
- gs_strfreev gchar **strv = NULL;
+ gs_strfreev char **strv = NULL;
const NMMetaSettingValidPartItem *const*type_settings;
const NMMetaSettingValidPartItem *const*slv_settings;
char modifier = '\0';
@@ -4805,9 +4805,9 @@ next:
static void
ask_option (NmCli *nmc, NMConnection *connection, const NMMetaAbstractInfo *abstract_info)
{
- gchar *value;
+ char *value;
GError *error = NULL;
- gs_free gchar *prompt = NULL;
+ gs_free char *prompt = NULL;
gboolean multi;
const char *opt_prompt, *opt_def_hint;
NMMetaPropertyInfFlags inf_flags;
diff --git a/clients/cli/devices.c b/clients/cli/devices.c
index 7f933d1278..16558166cf 100644
--- a/clients/cli/devices.c
+++ b/clients/cli/devices.c
@@ -3539,7 +3539,7 @@ generate_wpa_key (char *key, size_t len)
while (!g_ascii_isalnum (c))
c = g_random_int_range (33, 126);
- key[i] = (gchar) c;
+ key[i] = (char) c;
}
key[WPA_PASSKEY_SIZE] = '\0';
}
diff --git a/clients/common/nm-meta-setting-desc.c b/clients/common/nm-meta-setting-desc.c
index 37cefc2c5f..519f3c856c 100644
--- a/clients/common/nm-meta-setting-desc.c
+++ b/clients/common/nm-meta-setting-desc.c
@@ -1324,7 +1324,7 @@ fail:
if (!has_minmax && is_flags) {
min = 0;
- max = (gint) G_MAXUINT;
+ max = (int) G_MAXUINT;
}
valid_all = nm_utils_enum_get_values (gtype, min, max);
@@ -1381,7 +1381,7 @@ _values_fcn_gobject_enum (ARGS_VALUES_FCN)
class = g_type_class_ref (gtype);
if (G_IS_FLAGS_CLASS (class)) {
min = 0;
- max = (gint) G_MAXUINT;
+ max = (int) G_MAXUINT;
}
}
diff --git a/clients/common/nm-polkit-listener.c b/clients/common/nm-polkit-listener.c
index 300cf11e8d..a7bce6add9 100644
--- a/clients/common/nm-polkit-listener.c
+++ b/clients/common/nm-polkit-listener.c
@@ -175,7 +175,7 @@ on_cancelled (GCancellable *cancellable, gpointer user_data)
polkit_agent_session_cancel (priv->active_session);
}
-static gint
+static int
compare_users (gconstpointer a, gconstpointer b)
{
char *user;
diff --git a/clients/common/nm-secret-agent-simple.c b/clients/common/nm-secret-agent-simple.c
index 0856b51ffb..7048e0ef3e 100644
--- a/clients/common/nm-secret-agent-simple.c
+++ b/clients/common/nm-secret-agent-simple.c
@@ -53,9 +53,9 @@ static guint signals[LAST_SIGNAL] = { 0 };
typedef struct {
NMSecretAgentSimple *self;
- gchar *request_id;
+ char *request_id;
NMConnection *connection;
- gchar **hints;
+ char **hints;
NMSecretAgentOldGetSecretsFunc callback;
gpointer callback_data;
} NMSecretAgentSimpleRequest;
@@ -121,10 +121,10 @@ nm_secret_agent_simple_finalize (GObject *object)
}
static gboolean
-strv_has (gchar **haystack,
- gchar *needle)
+strv_has (char **haystack,
+ char *needle)
{
- gchar **iter;
+ char **iter;
for (iter = haystack; iter && *iter; iter++) {
if (g_strcmp0 (*iter, needle) == 0)
@@ -609,9 +609,9 @@ request_secrets_from_ui (NMSecretAgentSimpleRequest *request)
static void
nm_secret_agent_simple_get_secrets (NMSecretAgentOld *agent,
NMConnection *connection,
- const gchar *connection_path,
- const gchar *setting_name,
- const gchar **hints,
+ const char *connection_path,
+ const char *setting_name,
+ const char **hints,
NMSecretAgentGetSecretsFlags flags,
NMSecretAgentOldGetSecretsFunc callback,
gpointer callback_data)
@@ -644,7 +644,7 @@ nm_secret_agent_simple_get_secrets (NMSecretAgentOld *agent,
request = g_slice_new (NMSecretAgentSimpleRequest);
request->self = g_object_ref (self);
request->connection = g_object_ref (connection);
- request->hints = g_strdupv ((gchar **)hints);
+ request->hints = g_strdupv ((char **)hints);
request->callback = callback;
request->callback_data = callback_data;
request->request_id = request_id;
@@ -747,8 +747,8 @@ nm_secret_agent_simple_response (NMSecretAgentSimple *self,
static void
nm_secret_agent_simple_cancel_get_secrets (NMSecretAgentOld *agent,
- const gchar *connection_path,
- const gchar *setting_name)
+ const char *connection_path,
+ const char *setting_name)
{
NMSecretAgentSimple *self = NM_SECRET_AGENT_SIMPLE (agent);
NMSecretAgentSimplePrivate *priv = NM_SECRET_AGENT_SIMPLE_GET_PRIVATE (self);
@@ -761,7 +761,7 @@ nm_secret_agent_simple_cancel_get_secrets (NMSecretAgentOld *agent,
static void
nm_secret_agent_simple_save_secrets (NMSecretAgentOld *agent,
NMConnection *connection,
- const gchar *connection_path,
+ const char *connection_path,
NMSecretAgentOldSaveSecretsFunc callback,
gpointer callback_data)
{
@@ -772,7 +772,7 @@ nm_secret_agent_simple_save_secrets (NMSecretAgentOld *agent,
static void
nm_secret_agent_simple_delete_secrets (NMSecretAgentOld *agent,
NMConnection *connection,
- const gchar *connection_path,
+ const char *connection_path,
NMSecretAgentOldDeleteSecretsFunc callback,
gpointer callback_data)
{
diff --git a/clients/tui/nm-editor-bindings.c b/clients/tui/nm-editor-bindings.c
index 24803868e5..8df741f577 100644
--- a/clients/tui/nm-editor-bindings.c
+++ b/clients/tui/nm-editor-bindings.c
@@ -59,7 +59,7 @@ value_transform_string_uint (const GValue *src_value,
if (val < 0 || val > G_MAXUINT || *end)
return;
- g_value_set_uint (dest_value, (gint) val);
+ g_value_set_uint (dest_value, (int) val);
}
void
@@ -180,9 +180,9 @@ ip_addresses_with_prefix_from_strv (GBinding *binding,
void
nm_editor_bind_ip_addresses_with_prefix_to_strv (int addr_family,
gpointer source,
- const gchar *source_property,
+ const char *source_property,
gpointer target,
- const gchar *target_property,
+ const char *target_property,
GBindingFlags flags)
{
g_object_bind_property_full (source, source_property,
@@ -232,9 +232,9 @@ ip_addresses_check_and_copy (GBinding *binding,
void
nm_editor_bind_ip_addresses_to_strv (int addr_family,
gpointer source,
- const gchar *source_property,
+ const char *source_property,
gpointer target,
- const gchar *target_property,
+ const char *target_property,
GBindingFlags flags)
{
g_object_bind_property_full (source, source_property,
@@ -328,8 +328,8 @@ void
nm_editor_bind_ip_gateway_to_string (int addr_family,
NMSettingIPConfig *source,
gpointer target,
- const gchar *target_property,
- const gchar *target_sensitive_property,
+ const char *target_property,
+ const char *target_sensitive_property,
GBindingFlags flags)
{
g_object_bind_property_full (source, "gateway",
@@ -535,13 +535,13 @@ ip_route_transform_from_metric_string (GBinding *binding,
void
nm_editor_bind_ip_route_to_strings (int addr_family,
gpointer source,
- const gchar *source_property,
+ const char *source_property,
gpointer dest_target,
- const gchar *dest_target_property,
+ const char *dest_target_property,
gpointer next_hop_target,
- const gchar *next_hop_target_property,
+ const char *next_hop_target_property,
gpointer metric_target,
- const gchar *metric_target_property,
+ const char *metric_target_property,
GBindingFlags flags)
{
g_object_bind_property_full (source, source_property,
diff --git a/clients/tui/nm-editor-bindings.h b/clients/tui/nm-editor-bindings.h
index 72bd91e32d..174fb92932 100644
--- a/clients/tui/nm-editor-bindings.h
+++ b/clients/tui/nm-editor-bindings.h
@@ -23,33 +23,33 @@ void nm_editor_bindings_init (void);
void nm_editor_bind_ip_addresses_with_prefix_to_strv (int family,
gpointer source,
- const gchar *source_property,
+ const char *source_property,
gpointer target,
- const gchar *target_property,
+ const char *target_property,
GBindingFlags flags);
void nm_editor_bind_ip_addresses_to_strv (int family,
gpointer source,
- const gchar *source_property,
+ const char *source_property,
gpointer target,
- const gchar *target_property,
+ const char *target_property,
GBindingFlags flags);
void nm_editor_bind_ip_gateway_to_string (int family,
NMSettingIPConfig *source,
gpointer target,
- const gchar *target_property,
- const gchar *target_sensitive_property,
+ const char *target_property,
+ const char *target_sensitive_property,
GBindingFlags flags);
void nm_editor_bind_ip_route_to_strings (int family,
gpointer source,
- const gchar *source_property,
+ const char *source_property,
gpointer dest_target,
- const gchar *dest_target_property,
+ const char *dest_target_property,
gpointer next_hop_target,
- const gchar *next_hop_target_property,
+ const char *next_hop_target_property,
gpointer metric_target,
- const gchar *metric_target_property,
+ const char *metric_target_property,
GBindingFlags flags);
void nm_editor_bind_wireless_security_method (NMConnection *connection,
diff --git a/clients/tui/nm-editor-utils.c b/clients/tui/nm-editor-utils.c
index 8fecefa8e5..9dd95c0881 100644
--- a/clients/tui/nm-editor-utils.c
+++ b/clients/tui/nm-editor-utils.c
@@ -33,7 +33,7 @@
static GSList *vpn_plugins;
-static gint
+static int
sort_vpn_plugins (gconstpointer a, gconstpointer b)
{
NMVpnEditorPlugin *aa = NM_VPN_EDITOR_PLUGIN (a);
@@ -93,7 +93,7 @@ typedef struct {
gboolean no_autoconnect;
} NMEditorConnectionTypeDataReal;
-static gint
+static int
sort_types (gconstpointer a, gconstpointer b)
{
NMEditorConnectionTypeData *typea = *(NMEditorConnectionTypeData **)a;
diff --git a/clients/tui/nmt-page-ip-tunnel.c b/clients/tui/nmt-page-ip-tunnel.c
index 0b0b30eac1..563abf7691 100644
--- a/clients/tui/nmt-page-ip-tunnel.c
+++ b/clients/tui/nmt-page-ip-tunnel.c
@@ -94,7 +94,7 @@ add_offset (GBinding *binding,
gpointer user_data)
{
guint v;
- gint offset = GPOINTER_TO_INT (user_data);
+ int offset = GPOINTER_TO_INT (user_data);
g_return_val_if_fail (G_VALUE_HOLDS (from_value, G_TYPE_UINT), FALSE);
g_return_val_if_fail (G_VALUE_HOLDS (to_value, G_TYPE_UINT), FALSE);
diff --git a/dispatcher/nm-dispatcher.c b/dispatcher/nm-dispatcher.c
index 899669530a..946763f863 100644
--- a/dispatcher/nm-dispatcher.c
+++ b/dispatcher/nm-dispatcher.c
@@ -54,7 +54,7 @@ typedef struct {
Request *current_request;
GQueue *requests_waiting;
- gint num_requests_pending;
+ int num_requests_pending;
} Handler;
typedef struct {
@@ -131,8 +131,8 @@ struct Request {
GPtrArray *scripts; /* list of ScriptInfo */
guint idx;
- gint num_scripts_done;
- gint num_scripts_nowait;
+ int num_scripts_done;
+ int num_scripts_nowait;
};
/*****************************************************************************/
@@ -387,7 +387,7 @@ complete_script (ScriptInfo *script)
}
static void
-script_watch_cb (GPid pid, gint status, gpointer user_data)
+script_watch_cb (GPid pid, int status, gpointer user_data)
{
ScriptInfo *script = user_data;
guint err;
@@ -528,7 +528,7 @@ static gboolean
script_dispatch (ScriptInfo *script)
{
GError *error = NULL;
- gchar *argv[4];
+ char *argv[4];
Request *request = script->request;
if (script->dispatched)
@@ -828,9 +828,9 @@ on_name_lost (GDBusConnection *connection,
}
static void
-log_handler (const gchar *log_domain,
+log_handler (const char *log_domain,
GLogLevelFlags log_level,
- const gchar *message,
+ const char *message,
gpointer ignored)
{
int syslog_priority;
diff --git a/dispatcher/tests/test-dispatcher-envp.c b/dispatcher/tests/test-dispatcher-envp.c
index 5fa4a31498..78bcd233ef 100644
--- a/dispatcher/tests/test-dispatcher-envp.c
+++ b/dispatcher/tests/test-dispatcher-envp.c
@@ -124,7 +124,7 @@ parse_device (GKeyFile *kf, GVariant **out_device_props, GError **error)
{
GVariantBuilder props;
char *tmp;
- gint i;
+ int i;
g_variant_builder_init (&props, G_VARIANT_TYPE ("a{sv}"));
diff --git a/examples/C/glib/monitor-nm-running-gdbus.c b/examples/C/glib/monitor-nm-running-gdbus.c
index 16e1cfad8a..ad05a9e467 100644
--- a/examples/C/glib/monitor-nm-running-gdbus.c
+++ b/examples/C/glib/monitor-nm-running-gdbus.c
@@ -32,8 +32,8 @@
static void
on_name_appeared (GDBusConnection *connection,
- const gchar *name,
- const gchar *name_owner,
+ const char *name,
+ const char *name_owner,
gpointer user_data)
{
g_print ("Name '%s' on the system bus is owned by %s => NM is running\n",
@@ -42,7 +42,7 @@ on_name_appeared (GDBusConnection *connection,
static void
on_name_vanished (GDBusConnection *connection,
- const gchar *name,
+ const char *name,
gpointer user_data)
{
g_print ("Name '%s' does not exist on the system bus => NM is not running\n", name);
diff --git a/examples/C/glib/monitor-nm-state-gdbus.c b/examples/C/glib/monitor-nm-state-gdbus.c
index fdb4d95d81..4593f1a644 100644
--- a/examples/C/glib/monitor-nm-state-gdbus.c
+++ b/examples/C/glib/monitor-nm-state-gdbus.c
@@ -59,15 +59,15 @@ nm_state_to_string (NMState state)
static void
on_signal (GDBusProxy *proxy,
- gchar *sender_name,
- gchar *signal_name,
+ char *sender_name,
+ char *signal_name,
GVariant *parameters,
gpointer user_data)
{
guint32 new_state;
/* Print all signals */
- //gchar *parameters_str;
+ //char *parameters_str;
//parameters_str = g_variant_print (parameters, TRUE);
//g_print (" *** Received Signal: %s: %s\n", signal_name, parameters_str);
//g_free (parameters_str);
diff --git a/libnm-core/crypto_nss.c b/libnm-core/crypto_nss.c
index 56e91e26fc..a71a491862 100644
--- a/libnm-core/crypto_nss.c
+++ b/libnm-core/crypto_nss.c
@@ -399,7 +399,7 @@ crypto_verify_pkcs12 (const guint8 *data,
PK11SlotInfo *slot = NULL;
SECStatus s;
gunichar2 *ucs2_password;
- glong ucs2_chars = 0;
+ long ucs2_chars = 0;
#ifndef WORDS_BIGENDIAN
guint16 *p;
#endif /* WORDS_BIGENDIAN */
diff --git a/libnm-core/nm-core-internal.h b/libnm-core/nm-core-internal.h
index 8413bf99fa..8806e2ba53 100644
--- a/libnm-core/nm-core-internal.h
+++ b/libnm-core/nm-core-internal.h
@@ -320,11 +320,11 @@ GVariant *_nm_dbus_proxy_call_finish (GDBusProxy *proxy,
GError **error);
GVariant *_nm_dbus_proxy_call_sync (GDBusProxy *proxy,
- const gchar *method_name,
+ const char *method_name,
GVariant *parameters,
const GVariantType *reply_type,
GDBusCallFlags flags,
- gint timeout_msec,
+ int timeout_msec,
GCancellable *cancellable,
GError **error);
diff --git a/libnm-core/nm-dbus-utils.c b/libnm-core/nm-dbus-utils.c
index 8389bf361e..25af7c9964 100644
--- a/libnm-core/nm-dbus-utils.c
+++ b/libnm-core/nm-dbus-utils.c
@@ -117,7 +117,7 @@ dbus_signal_meta_marshal (GClosure *closure,
*
* The argument types in @c_handler correspond to the types output by
* g_dbus_gvariant_to_gvalue(), except for 'ay' and 'aay'. In particular:
- * - both 16-bit and 32-bit integers are passed as #gint/#guint
+ * - both 16-bit and 32-bit integers are passed as #int/#guint
* - 'as' values are passed as #GStrv (char **)
* - all other array, tuple, and dict types are passed as #GVariant
*
@@ -245,11 +245,11 @@ _nm_dbus_proxy_call_finish (GDBusProxy *proxy,
*/
GVariant *
_nm_dbus_proxy_call_sync (GDBusProxy *proxy,
- const gchar *method_name,
+ const char *method_name,
GVariant *parameters,
const GVariantType *reply_type,
GDBusCallFlags flags,
- gint timeout_msec,
+ int timeout_msec,
GCancellable *cancellable,
GError **error)
{
diff --git a/libnm-core/nm-keyfile-utils.c b/libnm-core/nm-keyfile-utils.c
index 5000b58318..21f8b07d70 100644
--- a/libnm-core/nm-keyfile-utils.c
+++ b/libnm-core/nm-keyfile-utils.c
@@ -109,8 +109,8 @@ nm_keyfile_plugin_kf_set_##stype##_list (GKeyFile *kf, \
g_key_file_set_##stype##_list (kf, alias ?: group, key, list, length); \
}
-DEFINE_KF_LIST_WRAPPER(integer, gint*, gint);
-DEFINE_KF_LIST_WRAPPER(string, gchar **, const gchar* const);
+DEFINE_KF_LIST_WRAPPER(integer, int*, int);
+DEFINE_KF_LIST_WRAPPER(string, char **, const char* const);
void
nm_keyfile_plugin_kf_set_integer_list_uint8 (GKeyFile *kf,
@@ -173,19 +173,19 @@ nm_keyfile_plugin_kf_set_##stype (GKeyFile *kf, \
g_key_file_set_##stype (kf, alias ?: group, key, value); \
}
-DEFINE_KF_WRAPPER(string, gchar*, const gchar*);
-DEFINE_KF_WRAPPER(integer, gint, gint);
+DEFINE_KF_WRAPPER(string, char*, const char*);
+DEFINE_KF_WRAPPER(integer, int, int);
DEFINE_KF_WRAPPER(uint64, guint64, guint64);
DEFINE_KF_WRAPPER(boolean, gboolean, gboolean);
-DEFINE_KF_WRAPPER(value, gchar*, const gchar*);
+DEFINE_KF_WRAPPER(value, char*, const char*);
-gchar **
+char **
nm_keyfile_plugin_kf_get_keys (GKeyFile *kf,
const char *group,
gsize *out_length,
GError **error)
{
- gchar **keys;
+ char **keys;
const char *alias;
GError *local = NULL;
diff --git a/libnm-core/nm-keyfile-utils.h b/libnm-core/nm-keyfile-utils.h
index 832ad0b4aa..46a6d56432 100644
--- a/libnm-core/nm-keyfile-utils.h
+++ b/libnm-core/nm-keyfile-utils.h
@@ -46,8 +46,8 @@ void nm_keyfile_plugin_kf_set_##stype##_list (GKeyFile *kf, \
const char *key, \
set_ctype list[], \
gsize length);
-DEFINE_KF_LIST_WRAPPER_PROTO(integer, gint*, gint)
-DEFINE_KF_LIST_WRAPPER_PROTO(string, gchar**, const gchar* const)
+DEFINE_KF_LIST_WRAPPER_PROTO(integer, int*, int)
+DEFINE_KF_LIST_WRAPPER_PROTO(string, char**, const char* const)
void nm_keyfile_plugin_kf_set_integer_list_uint8 (GKeyFile *kf,
const char *group,
@@ -66,14 +66,14 @@ void nm_keyfile_plugin_kf_set_##stype (GKeyFile *kf, \
const char *group, \
const char *key, \
set_ctype value);
-DEFINE_KF_WRAPPER_PROTO(string, gchar*, const gchar*)
-DEFINE_KF_WRAPPER_PROTO(integer, gint, gint)
+DEFINE_KF_WRAPPER_PROTO(string, char*, const char*)
+DEFINE_KF_WRAPPER_PROTO(integer, int, int)
DEFINE_KF_WRAPPER_PROTO(uint64, guint64, guint64)
DEFINE_KF_WRAPPER_PROTO(boolean, gboolean, gboolean)
-DEFINE_KF_WRAPPER_PROTO(value, gchar*, const gchar*)
+DEFINE_KF_WRAPPER_PROTO(value, char*, const char*)
/* Misc */
-gchar ** nm_keyfile_plugin_kf_get_keys (GKeyFile *kf,
+char ** nm_keyfile_plugin_kf_get_keys (GKeyFile *kf,
const char *group,
gsize *out_length,
GError **error);
diff --git a/libnm-core/nm-keyfile.c b/libnm-core/nm-keyfile.c
index 3ea1a53e67..17741f5f14 100644
--- a/libnm-core/nm-keyfile.c
+++ b/libnm-core/nm-keyfile.c
@@ -731,7 +731,7 @@ ip6_addr_gen_mode_parser (KeyfileReaderInfo *info, NMSetting *setting, const cha
} else
addr_gen_mode = NM_SETTING_IP6_CONFIG_ADDR_GEN_MODE_EUI64;
- g_object_set (G_OBJECT (setting), key, (gint) addr_gen_mode, NULL);
+ g_object_set (G_OBJECT (setting), key, (int) addr_gen_mode, NULL);
}
static void
@@ -1393,7 +1393,7 @@ qdisc_parser (KeyfileReaderInfo *info, NMSetting *setting, const char *key)
{
const char *setting_name = nm_setting_get_name (setting);
GPtrArray *qdiscs;
- gs_strfreev gchar **keys = NULL;
+ gs_strfreev char **keys = NULL;
gsize n_keys = 0;
int i;
@@ -1441,7 +1441,7 @@ tfilter_parser (KeyfileReaderInfo *info, NMSetting *setting, const char *key)
{
const char *setting_name = nm_setting_get_name (setting);
GPtrArray *tfilters;
- gs_strfreev gchar **keys = NULL;
+ gs_strfreev char **keys = NULL;
gsize n_keys = 0;
int i;
@@ -1525,7 +1525,7 @@ write_array_of_uint (GKeyFile *file,
g_return_if_fail (g_array_get_element_size (array) == sizeof (guint));
- tmp_array = g_new (gint, array->len);
+ tmp_array = g_new (int, array->len);
for (i = 0; i < array->len; i++) {
guint v = g_array_index (array, guint, i);
@@ -2522,7 +2522,7 @@ read_one_setting_value (NMSetting *setting,
} else
g_object_set (setting, key, int_val, NULL);
} else if (type == G_TYPE_BYTES) {
- gint *tmp;
+ int *tmp;
GByteArray *array;
GBytes *bytes;
gsize length;
@@ -2555,7 +2555,7 @@ read_one_setting_value (NMSetting *setting,
g_bytes_unref (bytes);
g_free (tmp);
} else if (type == G_TYPE_STRV) {
- gchar **sa;
+ char **sa;
gsize length;
sa = nm_keyfile_plugin_kf_get_string_list (keyfile, setting_name, key, &length, NULL);
@@ -2581,11 +2581,11 @@ read_one_setting_value (NMSetting *setting,
}
}
} else if (G_VALUE_HOLDS_ENUM (value)) {
- gint int_val;
+ int int_val;
int_val = nm_keyfile_plugin_kf_get_integer (keyfile, setting_name, key, &err);
if (!err)
- g_object_set (setting, key, (gint) int_val, NULL);
+ g_object_set (setting, key, (int) int_val, NULL);
} else {
if (!handle_warn (info, key, NM_KEYFILE_WARN_SEVERITY_WARN,
_("unhandled setting property type '%s'"),
@@ -2675,7 +2675,7 @@ nm_keyfile_read (GKeyFile *keyfile,
gs_unref_object NMConnection *connection = NULL;
NMSettingConnection *s_con;
NMSetting *setting;
- gchar **groups;
+ char **groups;
gsize length;
int i;
gboolean vpn_secrets = FALSE;
@@ -2880,7 +2880,7 @@ write_setting_value (NMSetting *setting,
char **array;
array = (char **) g_value_get_boxed (value);
- nm_keyfile_plugin_kf_set_string_list (info->keyfile, setting_name, key, (const gchar **const) array, g_strv_length (array));
+ nm_keyfile_plugin_kf_set_string_list (info->keyfile, setting_name, key, (const char **const) array, g_strv_length (array));
} else if (type == G_TYPE_HASH_TABLE) {
write_hash_of_string (info->keyfile, setting, key, value);
} else if (type == G_TYPE_ARRAY) {
@@ -2889,7 +2889,7 @@ write_setting_value (NMSetting *setting,
/* Flags are guint but GKeyFile has no uint reader, just uint64 */
nm_keyfile_plugin_kf_set_uint64 (info->keyfile, setting_name, key, (guint64) g_value_get_flags (value));
} else if (G_VALUE_HOLDS_ENUM (value))
- nm_keyfile_plugin_kf_set_integer (info->keyfile, setting_name, key, (gint) g_value_get_enum (value));
+ nm_keyfile_plugin_kf_set_integer (info->keyfile, setting_name, key, (int) g_value_get_enum (value));
else
g_warn_if_reached ();
}
diff --git a/libnm-core/nm-property-compare.c b/libnm-core/nm-property-compare.c
index 64ed663c22..2a3ee39732 100644
--- a/libnm-core/nm-property-compare.c
+++ b/libnm-core/nm-property-compare.c
@@ -27,7 +27,7 @@
#include "nm-property-compare.h"
-static gint
+static int
_nm_property_compare_collection (GVariant *value1, GVariant *value2)
{
GVariant *child1, *child2;
@@ -55,7 +55,7 @@ _nm_property_compare_collection (GVariant *value1, GVariant *value2)
return 0;
}
-static gint
+static int
_nm_property_compare_vardict (GVariant *value1, GVariant *value2)
{
GVariantIter iter;
@@ -87,7 +87,7 @@ _nm_property_compare_vardict (GVariant *value1, GVariant *value2)
return 0;
}
-static gint
+static int
_nm_property_compare_strdict (GVariant *value1, GVariant *value2)
{
GVariantIter iter;
@@ -119,7 +119,7 @@ nm_property_compare (GVariant *value1, GVariant *value2)
{
const GVariantType *type1;
const GVariantType *type2;
- gint ret;
+ int ret;
if (value1 == value2)
return 0;
diff --git a/libnm-core/nm-setting-8021x.c b/libnm-core/nm-setting-8021x.c
index bf9c418096..c21197ee25 100644
--- a/libnm-core/nm-setting-8021x.c
+++ b/libnm-core/nm-setting-8021x.c
@@ -114,7 +114,7 @@ typedef struct {
char *phase2_private_key_password;
NMSettingSecretFlags phase2_private_key_password_flags;
gboolean system_ca_certs;
- gint auth_timeout;
+ int auth_timeout;
} NMSetting8021xPrivate;
enum {
@@ -2724,7 +2724,7 @@ nm_setting_802_1x_get_phase2_private_key_format (NMSetting8021x *setting)
*
* Since: 1.8
**/
-gint
+int
nm_setting_802_1x_get_auth_timeout (NMSetting8021x *setting)
{
g_return_val_if_fail (NM_IS_SETTING_802_1X (setting), 0);
diff --git a/libnm-core/nm-setting-8021x.h b/libnm-core/nm-setting-8021x.h
index 986d048805..82ef5ebae1 100644
--- a/libnm-core/nm-setting-8021x.h
+++ b/libnm-core/nm-setting-8021x.h
@@ -359,7 +359,7 @@ NMSetting8021xCKFormat nm_setting_802_1x_get_phase2_private_key_format (NMSett
NM_AVAILABLE_IN_1_8
NMSetting8021xAuthFlags nm_setting_802_1x_get_phase1_auth_flags (NMSetting8021x *setting);
NM_AVAILABLE_IN_1_8
-gint nm_setting_802_1x_get_auth_timeout (NMSetting8021x *setting);
+int nm_setting_802_1x_get_auth_timeout (NMSetting8021x *setting);
G_END_DECLS
diff --git a/libnm-core/nm-setting-bond.c b/libnm-core/nm-setting-bond.c
index f450921f99..a35e48529a 100644
--- a/libnm-core/nm-setting-bond.c
+++ b/libnm-core/nm-setting-bond.c
@@ -179,7 +179,7 @@ nm_setting_bond_get_option (NMSettingBond *setting,
static gboolean
validate_int (const char *name, const char *value, const BondDefault *def)
{
- glong num;
+ long num;
guint i;
for (i = 0; i < strlen (value); i++) {
diff --git a/libnm-core/nm-setting-connection.c b/libnm-core/nm-setting-connection.c
index ac354fb944..88aa28dd6e 100644
--- a/libnm-core/nm-setting-connection.c
+++ b/libnm-core/nm-setting-connection.c
@@ -70,8 +70,8 @@ typedef struct {
NMSettingConnectionAutoconnectSlaves autoconnect_slaves;
GSList *permissions; /* list of Permission structs */
gboolean autoconnect;
- gint autoconnect_priority;
- gint autoconnect_retries;
+ int autoconnect_priority;
+ int autoconnect_retries;
guint64 timestamp;
gboolean read_only;
char *zone;
@@ -79,7 +79,7 @@ typedef struct {
guint gateway_ping_timeout;
NMMetered metered;
NMSettingConnectionLldp lldp;
- gint auth_retries;
+ int auth_retries;
int mdns;
} NMSettingConnectionPrivate;
@@ -527,7 +527,7 @@ nm_setting_connection_get_autoconnect (NMSettingConnection *setting)
*
* Returns: the connection's autoconnect priority
**/
-gint
+int
nm_setting_connection_get_autoconnect_priority (NMSettingConnection *setting)
{
g_return_val_if_fail (NM_IS_SETTING_CONNECTION (setting), 0);
@@ -546,7 +546,7 @@ nm_setting_connection_get_autoconnect_priority (NMSettingConnection *setting)
*
* Since: 1.6
**/
-gint
+int
nm_setting_connection_get_autoconnect_retries (NMSettingConnection *setting)
{
g_return_val_if_fail (NM_IS_SETTING_CONNECTION (setting), -1);
@@ -565,7 +565,7 @@ nm_setting_connection_get_autoconnect_retries (NMSettingConnection *setting)
*
* Since: 1.10
**/
-gint
+int
nm_setting_connection_get_auth_retries (NMSettingConnection *setting)
{
g_return_val_if_fail (NM_IS_SETTING_CONNECTION (setting), -1);
diff --git a/libnm-core/nm-setting-connection.h b/libnm-core/nm-setting-connection.h
index cf083a48e1..c3ec1a6dab 100644
--- a/libnm-core/nm-setting-connection.h
+++ b/libnm-core/nm-setting-connection.h
@@ -142,9 +142,9 @@ const char *nm_setting_connection_get_stable_id (NMSettingConnection *set
const char *nm_setting_connection_get_interface_name (NMSettingConnection *setting);
const char *nm_setting_connection_get_connection_type (NMSettingConnection *setting);
gboolean nm_setting_connection_get_autoconnect (NMSettingConnection *setting);
-gint nm_setting_connection_get_autoconnect_priority (NMSettingConnection *setting);
+int nm_setting_connection_get_autoconnect_priority (NMSettingConnection *setting);
NM_AVAILABLE_IN_1_6
-gint nm_setting_connection_get_autoconnect_retries (NMSettingConnection *setting);
+int nm_setting_connection_get_autoconnect_retries (NMSettingConnection *setting);
guint64 nm_setting_connection_get_timestamp (NMSettingConnection *setting);
gboolean nm_setting_connection_get_read_only (NMSettingConnection *setting);
@@ -187,7 +187,7 @@ NM_AVAILABLE_IN_1_2
NMSettingConnectionLldp nm_setting_connection_get_lldp (NMSettingConnection *setting);
NM_AVAILABLE_IN_1_10
-gint nm_setting_connection_get_auth_retries (NMSettingConnection *setting);
+int nm_setting_connection_get_auth_retries (NMSettingConnection *setting);
NM_AVAILABLE_IN_1_12
NMSettingConnectionMdns nm_setting_connection_get_mdns (NMSettingConnection *setting);
diff --git a/libnm-core/nm-setting-dcb.c b/libnm-core/nm-setting-dcb.c
index 55e11d6220..6471519607 100644
--- a/libnm-core/nm-setting-dcb.c
+++ b/libnm-core/nm-setting-dcb.c
@@ -47,14 +47,14 @@ G_DEFINE_TYPE_WITH_CODE (NMSettingDcb, nm_setting_dcb, NM_TYPE_SETTING,
typedef struct {
NMSettingDcbFlags app_fcoe_flags;
- gint app_fcoe_priority;
+ int app_fcoe_priority;
char * app_fcoe_mode;
NMSettingDcbFlags app_iscsi_flags;
- gint app_iscsi_priority;
+ int app_iscsi_priority;
NMSettingDcbFlags app_fip_flags;
- gint app_fip_priority;
+ int app_fip_priority;
/* Priority Flow Control */
NMSettingDcbFlags pfc_flags;
@@ -127,7 +127,7 @@ nm_setting_dcb_get_app_fcoe_flags (NMSettingDcb *setting)
*
* Returns: the #NMSettingDcb:app-fcoe-priority property of the setting
**/
-gint
+int
nm_setting_dcb_get_app_fcoe_priority (NMSettingDcb *setting)
{
g_return_val_if_fail (NM_IS_SETTING_DCB (setting), 0);
@@ -169,7 +169,7 @@ nm_setting_dcb_get_app_iscsi_flags (NMSettingDcb *setting)
*
* Returns: the #NMSettingDcb:app-iscsi-priority property of the setting
**/
-gint
+int
nm_setting_dcb_get_app_iscsi_priority (NMSettingDcb *setting)
{
g_return_val_if_fail (NM_IS_SETTING_DCB (setting), 0);
@@ -197,7 +197,7 @@ nm_setting_dcb_get_app_fip_flags (NMSettingDcb *setting)
*
* Returns: the #NMSettingDcb:app-fip-priority property of the setting
**/
-gint
+int
nm_setting_dcb_get_app_fip_priority (NMSettingDcb *setting)
{
g_return_val_if_fail (NM_IS_SETTING_DCB (setting), 0);
@@ -593,7 +593,7 @@ check_uint_array (const guint *array,
}
static gboolean
-check_priority (gint val,
+check_priority (int val,
NMSettingDcbFlags flags,
const char *prop_name,
GError **error)
diff --git a/libnm-core/nm-setting-dcb.h b/libnm-core/nm-setting-dcb.h
index 51a883fb89..92ca268205 100644
--- a/libnm-core/nm-setting-dcb.h
+++ b/libnm-core/nm-setting-dcb.h
@@ -112,14 +112,14 @@ GType nm_setting_dcb_get_type (void);
NMSetting * nm_setting_dcb_new (void);
NMSettingDcbFlags nm_setting_dcb_get_app_fcoe_flags (NMSettingDcb *setting);
-gint nm_setting_dcb_get_app_fcoe_priority (NMSettingDcb *setting);
+int nm_setting_dcb_get_app_fcoe_priority (NMSettingDcb *setting);
const char * nm_setting_dcb_get_app_fcoe_mode (NMSettingDcb *setting);
NMSettingDcbFlags nm_setting_dcb_get_app_iscsi_flags (NMSettingDcb *setting);
-gint nm_setting_dcb_get_app_iscsi_priority (NMSettingDcb *setting);
+int nm_setting_dcb_get_app_iscsi_priority (NMSettingDcb *setting);
NMSettingDcbFlags nm_setting_dcb_get_app_fip_flags (NMSettingDcb *setting);
-gint nm_setting_dcb_get_app_fip_priority (NMSettingDcb *setting);
+int nm_setting_dcb_get_app_fip_priority (NMSettingDcb *setting);
/* Priority Flow Control */
NMSettingDcbFlags nm_setting_dcb_get_priority_flow_control_flags (NMSettingDcb *setting);
diff --git a/libnm-core/nm-setting-ip-config.c b/libnm-core/nm-setting-ip-config.c
index c7f8c55557..8e2df0c321 100644
--- a/libnm-core/nm-setting-ip-config.c
+++ b/libnm-core/nm-setting-ip-config.c
@@ -1391,7 +1391,7 @@ typedef struct {
GPtrArray *dns; /* array of IP address strings */
GPtrArray *dns_search; /* array of domain name strings */
GPtrArray *dns_options;/* array of DNS options */
- gint dns_priority;
+ int dns_priority;
GPtrArray *addresses; /* array of NMIPAddress */
GPtrArray *routes; /* array of NMIPRoute */
gint64 route_metric;
@@ -1403,8 +1403,8 @@ typedef struct {
gboolean dhcp_send_hostname;
gboolean never_default;
gboolean may_fail;
- gint dad_timeout;
- gint dhcp_timeout;
+ int dad_timeout;
+ int dhcp_timeout;
} NMSettingIPConfigPrivate;
enum {
@@ -1804,7 +1804,7 @@ nm_setting_ip_config_get_dns_option (NMSettingIPConfig *setting, guint idx)
*
* Since: 1.2
**/
-gint
+int
nm_setting_ip_config_next_valid_dns_option (NMSettingIPConfig *setting, guint idx)
{
NMSettingIPConfigPrivate *priv;
@@ -1966,7 +1966,7 @@ nm_setting_ip_config_clear_dns_options (NMSettingIPConfig *setting, gboolean is_
*
* Since: 1.4
**/
-gint
+int
nm_setting_ip_config_get_dns_priority (NMSettingIPConfig *setting)
{
g_return_val_if_fail (NM_IS_SETTING_IP_CONFIG (setting), 0);
@@ -2421,7 +2421,7 @@ nm_setting_ip_config_get_may_fail (NMSettingIPConfig *setting)
*
* Since: 1.2
**/
-gint
+int
nm_setting_ip_config_get_dad_timeout (NMSettingIPConfig *setting)
{
g_return_val_if_fail (NM_IS_SETTING_IP_CONFIG (setting), 0);
@@ -2441,7 +2441,7 @@ nm_setting_ip_config_get_dad_timeout (NMSettingIPConfig *setting)
*
* Since: 1.2
**/
-gint
+int
nm_setting_ip_config_get_dhcp_timeout (NMSettingIPConfig *setting)
{
g_return_val_if_fail (NM_IS_SETTING_IP_CONFIG (setting), 0);
diff --git a/libnm-core/nm-setting-ip-config.h b/libnm-core/nm-setting-ip-config.h
index 8b3c85de19..882a88b685 100644
--- a/libnm-core/nm-setting-ip-config.h
+++ b/libnm-core/nm-setting-ip-config.h
@@ -247,7 +247,7 @@ guint nm_setting_ip_config_get_num_dns_options (NMSettingIPConfig
gboolean nm_setting_ip_config_has_dns_options (NMSettingIPConfig *setting);
const char *nm_setting_ip_config_get_dns_option (NMSettingIPConfig *setting,
guint idx);
-gint nm_setting_ip_config_next_valid_dns_option (NMSettingIPConfig *setting,
+int nm_setting_ip_config_next_valid_dns_option (NMSettingIPConfig *setting,
guint idx);
gboolean nm_setting_ip_config_add_dns_option (NMSettingIPConfig *setting,
const char *dns_option);
@@ -258,7 +258,7 @@ gboolean nm_setting_ip_config_remove_dns_option_by_value (NMSettingIPConfig
void nm_setting_ip_config_clear_dns_options (NMSettingIPConfig *setting, gboolean is_set);
NM_AVAILABLE_IN_1_4
-gint nm_setting_ip_config_get_dns_priority (NMSettingIPConfig *setting);
+int nm_setting_ip_config_get_dns_priority (NMSettingIPConfig *setting);
guint nm_setting_ip_config_get_num_addresses (NMSettingIPConfig *setting);
NMIPAddress *nm_setting_ip_config_get_address (NMSettingIPConfig *setting,
@@ -298,9 +298,9 @@ gboolean nm_setting_ip_config_get_dhcp_send_hostname (NMSettingIPConfig
gboolean nm_setting_ip_config_get_never_default (NMSettingIPConfig *setting);
gboolean nm_setting_ip_config_get_may_fail (NMSettingIPConfig *setting);
NM_AVAILABLE_IN_1_2
-gint nm_setting_ip_config_get_dad_timeout (NMSettingIPConfig *setting);
+int nm_setting_ip_config_get_dad_timeout (NMSettingIPConfig *setting);
NM_AVAILABLE_IN_1_2
-gint nm_setting_ip_config_get_dhcp_timeout (NMSettingIPConfig *setting);
+int nm_setting_ip_config_get_dhcp_timeout (NMSettingIPConfig *setting);
G_END_DECLS
diff --git a/libnm-core/nm-setting-private.h b/libnm-core/nm-setting-private.h
index 49bf963dda..043836a0f0 100644
--- a/libnm-core/nm-setting-private.h
+++ b/libnm-core/nm-setting-private.h
@@ -42,7 +42,7 @@ void _nm_register_setting_impl (const char *name,
NMSettingPriority _nm_setting_get_base_type_priority (NMSetting *setting);
NMSettingPriority _nm_setting_type_get_base_type_priority (GType type);
-gint _nm_setting_compare_priority (gconstpointer a, gconstpointer b);
+int _nm_setting_compare_priority (gconstpointer a, gconstpointer b);
typedef enum NMSettingUpdateSecretResult {
NM_SETTING_UPDATE_SECRET_ERROR = FALSE,
diff --git a/libnm-core/nm-setting-team-port.c b/libnm-core/nm-setting-team-port.c
index 76f0eec1a7..e0e5dacaa7 100644
--- a/libnm-core/nm-setting-team-port.c
+++ b/libnm-core/nm-setting-team-port.c
@@ -114,7 +114,7 @@ nm_setting_team_port_get_config (NMSettingTeamPort *setting)
*
* Since: 1.12
**/
-gint
+int
nm_setting_team_port_get_queue_id (NMSettingTeamPort *setting)
{
g_return_val_if_fail (NM_IS_SETTING_TEAM_PORT (setting), -1);
@@ -130,7 +130,7 @@ nm_setting_team_port_get_queue_id (NMSettingTeamPort *setting)
*
* Since: 1.12
**/
-gint
+int
nm_setting_team_port_get_prio (NMSettingTeamPort *setting)
{
g_return_val_if_fail (NM_IS_SETTING_TEAM_PORT (setting), 0);
@@ -162,7 +162,7 @@ nm_setting_team_port_get_sticky (NMSettingTeamPort *setting)
*
* Since: 1.12
**/
-gint
+int
nm_setting_team_port_get_lacp_prio (NMSettingTeamPort *setting)
{
g_return_val_if_fail (NM_IS_SETTING_TEAM_PORT (setting), 0);
@@ -178,7 +178,7 @@ nm_setting_team_port_get_lacp_prio (NMSettingTeamPort *setting)
*
* Since: 1.12
**/
-gint
+int
nm_setting_team_port_get_lacp_key (NMSettingTeamPort *setting)
{
g_return_val_if_fail (NM_IS_SETTING_TEAM_PORT (setting), 0);
diff --git a/libnm-core/nm-setting-team-port.h b/libnm-core/nm-setting-team-port.h
index 4ecb183847..57611750b3 100644
--- a/libnm-core/nm-setting-team-port.h
+++ b/libnm-core/nm-setting-team-port.h
@@ -72,15 +72,15 @@ NMSetting * nm_setting_team_port_new (void);
const char * nm_setting_team_port_get_config (NMSettingTeamPort *setting);
NM_AVAILABLE_IN_1_12
-gint nm_setting_team_port_get_queue_id (NMSettingTeamPort *setting);
+int nm_setting_team_port_get_queue_id (NMSettingTeamPort *setting);
NM_AVAILABLE_IN_1_12
-gint nm_setting_team_port_get_prio (NMSettingTeamPort *setting);
+int nm_setting_team_port_get_prio (NMSettingTeamPort *setting);
NM_AVAILABLE_IN_1_12
gboolean nm_setting_team_port_get_sticky (NMSettingTeamPort *setting);
NM_AVAILABLE_IN_1_12
-gint nm_setting_team_port_get_lacp_prio (NMSettingTeamPort *setting);
+int nm_setting_team_port_get_lacp_prio (NMSettingTeamPort *setting);
NM_AVAILABLE_IN_1_12
-gint nm_setting_team_port_get_lacp_key (NMSettingTeamPort *setting);
+int nm_setting_team_port_get_lacp_key (NMSettingTeamPort *setting);
NM_AVAILABLE_IN_1_12
guint nm_setting_team_port_get_num_link_watchers (NMSettingTeamPort *setting);
NM_AVAILABLE_IN_1_12
diff --git a/libnm-core/nm-setting-team.c b/libnm-core/nm-setting-team.c
index 138ad85a6d..b413adaec2 100644
--- a/libnm-core/nm-setting-team.c
+++ b/libnm-core/nm-setting-team.c
@@ -118,8 +118,8 @@ struct NMTeamLinkWatcher {
* Since: 1.12
**/
NMTeamLinkWatcher *
-nm_team_link_watcher_new_ethtool (gint delay_up,
- gint delay_down,
+nm_team_link_watcher_new_ethtool (int delay_up,
+ int delay_down,
GError **error)
{
NMTeamLinkWatcher *watcher;
@@ -161,9 +161,9 @@ nm_team_link_watcher_new_ethtool (gint delay_up,
* Since: 1.12
**/
NMTeamLinkWatcher *
-nm_team_link_watcher_new_nsna_ping (gint init_wait,
- gint interval,
- gint missed_max,
+nm_team_link_watcher_new_nsna_ping (int init_wait,
+ int interval,
+ int missed_max,
const char *target_host,
GError **error)
{
@@ -225,9 +225,9 @@ nm_team_link_watcher_new_nsna_ping (gint init_wait,
* Since: 1.12
**/
NMTeamLinkWatcher *
-nm_team_link_watcher_new_arp_ping (gint init_wait,
- gint interval,
- gint missed_max,
+nm_team_link_watcher_new_arp_ping (int init_wait,
+ int interval,
+ int missed_max,
const char *target_host,
const char *source_host,
NMTeamLinkWatcherArpPingFlags flags,
@@ -564,19 +564,19 @@ G_DEFINE_TYPE_WITH_CODE (NMSettingTeam, nm_setting_team, NM_TYPE_SETTING,
typedef struct {
char *config;
- gint notify_peers_count;
- gint notify_peers_interval;
- gint mcast_rejoin_count;
- gint mcast_rejoin_interval;
+ int notify_peers_count;
+ int notify_peers_interval;
+ int mcast_rejoin_count;
+ int mcast_rejoin_interval;
char *runner;
char *runner_hwaddr_policy;
GPtrArray *runner_tx_hash;
char *runner_tx_balancer;
- gint runner_tx_balancer_interval;
+ int runner_tx_balancer_interval;
gboolean runner_active;
gboolean runner_fast_rate;
- gint runner_sys_prio;
- gint runner_min_ports;
+ int runner_sys_prio;
+ int runner_min_ports;
char *runner_agg_select_policy;
GPtrArray *link_watchers; /* Array of NMTeamLinkWatcher */
} NMSettingTeamPrivate;
@@ -660,7 +660,7 @@ nm_setting_team_get_config (NMSettingTeam *setting)
*
* Since: 1.12
**/
-gint
+int
nm_setting_team_get_notify_peers_count (NMSettingTeam *setting)
{
g_return_val_if_fail (NM_IS_SETTING_TEAM (setting), 0);
@@ -676,7 +676,7 @@ nm_setting_team_get_notify_peers_count (NMSettingTeam *setting)
*
* Since: 1.12
**/
-gint
+int
nm_setting_team_get_notify_peers_interval (NMSettingTeam *setting)
{
g_return_val_if_fail (NM_IS_SETTING_TEAM (setting), 0);
@@ -692,7 +692,7 @@ nm_setting_team_get_notify_peers_interval (NMSettingTeam *setting)
*
* Since: 1.12
**/
-gint
+int
nm_setting_team_get_mcast_rejoin_count (NMSettingTeam *setting)
{
g_return_val_if_fail (NM_IS_SETTING_TEAM (setting), 0);
@@ -708,7 +708,7 @@ nm_setting_team_get_mcast_rejoin_count (NMSettingTeam *setting)
*
* Since: 1.12
**/
-gint
+int
nm_setting_team_get_mcast_rejoin_interval (NMSettingTeam *setting)
{
g_return_val_if_fail (NM_IS_SETTING_TEAM (setting), 0);
@@ -772,7 +772,7 @@ nm_setting_team_get_runner_tx_balancer (NMSettingTeam *setting)
*
* Since: 1.12
**/
-gint
+int
nm_setting_team_get_runner_tx_balancer_interval (NMSettingTeam *setting)
{
g_return_val_if_fail (NM_IS_SETTING_TEAM (setting), 0);
@@ -820,7 +820,7 @@ nm_setting_team_get_runner_fast_rate (NMSettingTeam *setting)
*
* Since: 1.12
**/
-gint
+int
nm_setting_team_get_runner_sys_prio (NMSettingTeam *setting)
{
g_return_val_if_fail (NM_IS_SETTING_TEAM (setting), 0);
@@ -836,7 +836,7 @@ nm_setting_team_get_runner_sys_prio (NMSettingTeam *setting)
*
* Since: 1.12
**/
-gint
+int
nm_setting_team_get_runner_min_ports (NMSettingTeam *setting)
{
g_return_val_if_fail (NM_IS_SETTING_TEAM (setting), 0);
diff --git a/libnm-core/nm-setting-team.h b/libnm-core/nm-setting-team.h
index cd766d8e6d..a600053a67 100644
--- a/libnm-core/nm-setting-team.h
+++ b/libnm-core/nm-setting-team.h
@@ -57,19 +57,19 @@ typedef struct NMTeamLinkWatcher NMTeamLinkWatcher;
GType nm_team_link_watcher_get_type (void);
NM_AVAILABLE_IN_1_12
-NMTeamLinkWatcher *nm_team_link_watcher_new_ethtool (gint delay_up,
- gint delay_down,
+NMTeamLinkWatcher *nm_team_link_watcher_new_ethtool (int delay_up,
+ int delay_down,
GError **error);
NM_AVAILABLE_IN_1_12
-NMTeamLinkWatcher *nm_team_link_watcher_new_nsna_ping (gint init_wait,
- gint interval,
- gint missed_max,
+NMTeamLinkWatcher *nm_team_link_watcher_new_nsna_ping (int init_wait,
+ int interval,
+ int missed_max,
const char *target_host,
GError **error);
NM_AVAILABLE_IN_1_12
-NMTeamLinkWatcher *nm_team_link_watcher_new_arp_ping (gint init_wait,
- gint interval,
- gint missed_max,
+NMTeamLinkWatcher *nm_team_link_watcher_new_arp_ping (int init_wait,
+ int interval,
+ int missed_max,
const char *target_host,
const char *source_host,
NMTeamLinkWatcherArpPingFlags flags,
@@ -174,13 +174,13 @@ NMSetting * nm_setting_team_new (void);
const char * nm_setting_team_get_config (NMSettingTeam *setting);
NM_AVAILABLE_IN_1_12
-gint nm_setting_team_get_notify_peers_count (NMSettingTeam *setting);
+int nm_setting_team_get_notify_peers_count (NMSettingTeam *setting);
NM_AVAILABLE_IN_1_12
-gint nm_setting_team_get_notify_peers_interval (NMSettingTeam *setting);
+int nm_setting_team_get_notify_peers_interval (NMSettingTeam *setting);
NM_AVAILABLE_IN_1_12
-gint nm_setting_team_get_mcast_rejoin_count (NMSettingTeam *setting);
+int nm_setting_team_get_mcast_rejoin_count (NMSettingTeam *setting);
NM_AVAILABLE_IN_1_12
-gint nm_setting_team_get_mcast_rejoin_interval (NMSettingTeam *setting);
+int nm_setting_team_get_mcast_rejoin_interval (NMSettingTeam *setting);
NM_AVAILABLE_IN_1_12
const char * nm_setting_team_get_runner (NMSettingTeam *setting);
NM_AVAILABLE_IN_1_12
@@ -188,15 +188,15 @@ const char * nm_setting_team_get_runner_hwaddr_policy (NMSettingTeam *setting);
NM_AVAILABLE_IN_1_12
const char * nm_setting_team_get_runner_tx_balancer (NMSettingTeam *setting);
NM_AVAILABLE_IN_1_12
-gint nm_setting_team_get_runner_tx_balancer_interval (NMSettingTeam *setting);
+int nm_setting_team_get_runner_tx_balancer_interval (NMSettingTeam *setting);
NM_AVAILABLE_IN_1_12
gboolean nm_setting_team_get_runner_active (NMSettingTeam *setting);
NM_AVAILABLE_IN_1_12
gboolean nm_setting_team_get_runner_fast_rate (NMSettingTeam *setting);
NM_AVAILABLE_IN_1_12
-gint nm_setting_team_get_runner_sys_prio (NMSettingTeam *setting);
+int nm_setting_team_get_runner_sys_prio (NMSettingTeam *setting);
NM_AVAILABLE_IN_1_12
-gint nm_setting_team_get_runner_min_ports (NMSettingTeam *setting);
+int nm_setting_team_get_runner_min_ports (NMSettingTeam *setting);
NM_AVAILABLE_IN_1_12
const char * nm_setting_team_get_runner_agg_select_policy (NMSettingTeam *setting);
NM_AVAILABLE_IN_1_12
diff --git a/libnm-core/nm-setting-vlan.c b/libnm-core/nm-setting-vlan.c
index 56e44b76cf..b9bea9e4cd 100644
--- a/libnm-core/nm-setting-vlan.c
+++ b/libnm-core/nm-setting-vlan.c
@@ -133,7 +133,7 @@ static NMVlanQosMapping *
priority_map_new_from_str (NMVlanPriorityMap map, const char *str)
{
NMVlanQosMapping *p = NULL;
- gchar **t = NULL;
+ char **t = NULL;
guint32 len;
guint64 from, to;
@@ -175,7 +175,7 @@ get_map (NMSettingVlan *self, NMVlanPriorityMap map)
return NULL;
}
-static gint
+static int
prio_map_compare (gconstpointer p_a, gconstpointer p_b)
{
const NMVlanQosMapping *a = p_a;
diff --git a/libnm-core/nm-setting.c b/libnm-core/nm-setting.c
index 3c3292ea34..fa1f3fdfba 100644
--- a/libnm-core/nm-setting.c
+++ b/libnm-core/nm-setting.c
@@ -308,7 +308,7 @@ nm_setting_lookup_type (const char *name)
return info ? info->type : G_TYPE_INVALID;
}
-gint
+int
_nm_setting_compare_priority (gconstpointer a, gconstpointer b)
{
NMSettingPriority prio_a, prio_b;
@@ -1273,7 +1273,7 @@ nm_setting_compare (NMSetting *a,
{
GParamSpec **property_specs;
guint n_property_specs;
- gint same = TRUE;
+ int same = TRUE;
guint i;
g_return_val_if_fail (NM_IS_SETTING (a), FALSE);
diff --git a/libnm-core/nm-setting.h b/libnm-core/nm-setting.h
index 47a2fdc1d4..536aea709d 100644
--- a/libnm-core/nm-setting.h
+++ b/libnm-core/nm-setting.h
@@ -172,7 +172,7 @@ typedef struct {
GObjectClass parent;
/* Virtual functions */
- gint (*verify) (NMSetting *setting,
+ int (*verify) (NMSetting *setting,
NMConnection *connection,
GError **error);
diff --git a/libnm-core/nm-utils.c b/libnm-core/nm-utils.c
index 702e05f4b8..62da974f19 100644
--- a/libnm-core/nm-utils.c
+++ b/libnm-core/nm-utils.c
@@ -309,19 +309,19 @@ nm_utils_ssid_to_utf8 (const guint8 *ssid, gsize len)
g_return_val_if_fail (ssid != NULL, NULL);
- if (g_utf8_validate ((const gchar *) ssid, len, NULL))
- return g_strndup ((const gchar *) ssid, len);
+ if (g_utf8_validate ((const char *) ssid, len, NULL))
+ return g_strndup ((const char *) ssid, len);
encodings = get_system_encodings ();
for (e = encodings; *e; e++) {
- converted = g_convert ((const gchar *) ssid, len, "UTF-8", *e, NULL, NULL, NULL);
+ converted = g_convert ((const char *) ssid, len, "UTF-8", *e, NULL, NULL, NULL);
if (converted)
break;
}
if (!converted) {
- converted = g_convert_with_fallback ((const gchar *) ssid, len,
+ converted = g_convert_with_fallback ((const char *) ssid, len,
"UTF-8", encodings[0], "?", NULL, NULL, NULL);
}
@@ -332,7 +332,7 @@ nm_utils_ssid_to_utf8 (const guint8 *ssid, gsize len)
*/
/* Use the printable range of 0x20-0x7E */
- gchar *valid_chars = " !\"#$%&'()*+,-./0123456789:;<=>?@"
+ char *valid_chars = " !\"#$%&'()*+,-./0123456789:;<=>?@"
"ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`"
"abcdefghijklmnopqrstuvwxyz{|}~";
@@ -4895,7 +4895,7 @@ nm_utils_enum_from_str (GType type, const char *str,
*
* Since: 1.2
*/
-const char **nm_utils_enum_get_values (GType type, gint from, gint to)
+const char **nm_utils_enum_get_values (GType type, int from, int to)
{
return _nm_utils_enum_get_values (type, from, to);
}
diff --git a/libnm-core/nm-utils.h b/libnm-core/nm-utils.h
index 7024586967..87463ac3cb 100644
--- a/libnm-core/nm-utils.h
+++ b/libnm-core/nm-utils.h
@@ -213,7 +213,7 @@ NM_AVAILABLE_IN_1_2
gboolean nm_utils_enum_from_str (GType type, const char *str, int *out_value, char **err_token);
NM_AVAILABLE_IN_1_2
-const char **nm_utils_enum_get_values (GType type, gint from, gint to);
+const char **nm_utils_enum_get_values (GType type, int from, int to);
NM_AVAILABLE_IN_1_6
guint nm_utils_version (void);
diff --git a/libnm-core/tests/test-general.c b/libnm-core/tests/test-general.c
index 5c3926f081..ffa4da0213 100644
--- a/libnm-core/tests/test-general.c
+++ b/libnm-core/tests/test-general.c
@@ -223,8 +223,8 @@ test_nm_g_slice_free_fcn (void)
p = g_slice_new (gint32);
(nm_g_slice_free_fcn (gint32)) (p);
- p = g_slice_new (gint);
- (nm_g_slice_free_fcn (gint)) (p);
+ p = g_slice_new (int);
+ (nm_g_slice_free_fcn (int)) (p);
p = g_slice_new (gint64);
nm_g_slice_free_fcn_gint64 (p);
@@ -6034,7 +6034,7 @@ static void
test_nm_utils_is_power_of_two (void)
{
guint64 xyes, xno;
- gint i, j;
+ int i, j;
GRand *rand = nmtst_get_rand ();
int numbits;
@@ -6952,7 +6952,7 @@ test_route_attributes_format (void)
/*****************************************************************************/
static gboolean
-do_test_nm_set_out_called (gint *call_count)
+do_test_nm_set_out_called (int *call_count)
{
(*call_count)++;
return TRUE;
diff --git a/libnm-glib/libnm-glib-test.c b/libnm-glib/libnm-glib-test.c
index c4723c954d..3b1866c587 100644
--- a/libnm-glib/libnm-glib-test.c
+++ b/libnm-glib/libnm-glib-test.c
@@ -68,7 +68,7 @@ test_get_state (NMClient *client)
return TRUE;
}
-static gchar *
+static char *
ip4_address_as_string (guint32 ip)
{
char buf[INET_ADDRSTRLEN+1];
diff --git a/libnm-glib/nm-access-point.c b/libnm-glib/nm-access-point.c
index 592818fadc..a0cacfde4b 100644
--- a/libnm-glib/nm-access-point.c
+++ b/libnm-glib/nm-access-point.c
@@ -51,7 +51,7 @@ typedef struct {
NM80211Mode mode;
guint32 max_bitrate;
guint8 strength;
- gint last_seen;
+ int last_seen;
} NMAccessPointPrivate;
enum {
@@ -277,7 +277,7 @@ nm_access_point_get_strength (NMAccessPoint *ap)
*
* Since: 1.2
**/
-gint
+int
nm_access_point_get_last_seen (NMAccessPoint *ap)
{
g_return_val_if_fail (NM_IS_ACCESS_POINT (ap), -1);
diff --git a/libnm-glib/nm-access-point.h b/libnm-glib/nm-access-point.h
index e9a3fc6b53..d25de5417e 100644
--- a/libnm-glib/nm-access-point.h
+++ b/libnm-glib/nm-access-point.h
@@ -81,7 +81,7 @@ NM80211Mode nm_access_point_get_mode (NMAccessPoint *ap);
guint32 nm_access_point_get_max_bitrate (NMAccessPoint *ap);
guint8 nm_access_point_get_strength (NMAccessPoint *ap);
NM_AVAILABLE_IN_1_2
-gint nm_access_point_get_last_seen (NMAccessPoint *ap);
+int nm_access_point_get_last_seen (NMAccessPoint *ap);
GSList * nm_access_point_filter_connections (NMAccessPoint *ap,
const GSList *connections);
diff --git a/libnm-glib/nm-device-wimax.c b/libnm-glib/nm-device-wimax.c
index cda3601670..3465475a4a 100644
--- a/libnm-glib/nm-device-wimax.c
+++ b/libnm-glib/nm-device-wimax.c
@@ -48,9 +48,9 @@ typedef struct {
GPtrArray *nsps;
guint center_freq;
- gint rssi;
- gint cinr;
- gint tx_power;
+ int rssi;
+ int cinr;
+ int tx_power;
char *bsid;
} NMDeviceWimaxPrivate;
@@ -299,7 +299,7 @@ nm_device_wimax_get_center_frequency (NMDeviceWimax *self)
*
* Deprecated: 1.2: WiMAX is no longer supported.
**/
-gint
+int
nm_device_wimax_get_rssi (NMDeviceWimax *self)
{
g_return_val_if_fail (NM_IS_DEVICE_WIMAX (self), 0);
@@ -320,7 +320,7 @@ nm_device_wimax_get_rssi (NMDeviceWimax *self)
*
* Deprecated: 1.2: WiMAX is no longer supported.
**/
-gint
+int
nm_device_wimax_get_cinr (NMDeviceWimax *self)
{
g_return_val_if_fail (NM_IS_DEVICE_WIMAX (self), 0);
@@ -341,7 +341,7 @@ nm_device_wimax_get_cinr (NMDeviceWimax *self)
*
* Deprecated: 1.2: WiMAX is no longer supported.
**/
-gint
+int
nm_device_wimax_get_tx_power (NMDeviceWimax *self)
{
g_return_val_if_fail (NM_IS_DEVICE_WIMAX (self), 0);
diff --git a/libnm-glib/nm-device-wimax.h b/libnm-glib/nm-device-wimax.h
index 24e46348e1..21d28117b4 100644
--- a/libnm-glib/nm-device-wimax.h
+++ b/libnm-glib/nm-device-wimax.h
@@ -96,11 +96,11 @@ const GPtrArray *nm_device_wimax_get_nsps (NMDeviceWimax *wimax);
NM_DEPRECATED_IN_1_2
guint nm_device_wimax_get_center_frequency (NMDeviceWimax *self);
NM_DEPRECATED_IN_1_2
-gint nm_device_wimax_get_rssi (NMDeviceWimax *self);
+int nm_device_wimax_get_rssi (NMDeviceWimax *self);
NM_DEPRECATED_IN_1_2
-gint nm_device_wimax_get_cinr (NMDeviceWimax *self);
+int nm_device_wimax_get_cinr (NMDeviceWimax *self);
NM_DEPRECATED_IN_1_2
-gint nm_device_wimax_get_tx_power (NMDeviceWimax *self);
+int nm_device_wimax_get_tx_power (NMDeviceWimax *self);
NM_DEPRECATED_IN_1_2
const char * nm_device_wimax_get_bsid (NMDeviceWimax *self);
diff --git a/libnm-glib/nm-object.c b/libnm-glib/nm-object.c
index 5956b344ee..e2c96d62b9 100644
--- a/libnm-glib/nm-object.c
+++ b/libnm-glib/nm-object.c
@@ -551,7 +551,7 @@ deferred_notify_cb (gpointer data)
for (iter = props; iter; iter = g_slist_next (iter)) {
NotifyItem *item = iter->data;
char buf[50];
- gint ret = 0;
+ int ret = 0;
switch (item->pending) {
case NOTIFY_SIGNAL_PENDING_ADDED:
diff --git a/libnm-glib/nm-vpn-plugin-utils.c b/libnm-glib/nm-vpn-plugin-utils.c
index d53c98345f..ca652d1be9 100644
--- a/libnm-glib/nm-vpn-plugin-utils.c
+++ b/libnm-glib/nm-vpn-plugin-utils.c
@@ -66,7 +66,7 @@ nm_vpn_plugin_utils_read_vpn_details (int fd,
gboolean success = FALSE;
char *key = NULL, *val = NULL;
GString *line;
- gchar c;
+ char c;
if (out_data)
g_return_val_if_fail (*out_data == NULL, FALSE);
diff --git a/libnm-util/crypto_nss.c b/libnm-util/crypto_nss.c
index b55af774ec..5736db4f89 100644
--- a/libnm-util/crypto_nss.c
+++ b/libnm-util/crypto_nss.c
@@ -441,7 +441,7 @@ crypto_verify_pkcs12 (const GByteArray *data,
PK11SlotInfo *slot = NULL;
SECStatus s;
char *ucs2_password;
- glong ucs2_chars = 0;
+ long ucs2_chars = 0;
#ifndef WORDS_BIGENDIAN
guint16 *p;
#endif /* WORDS_BIGENDIAN */
diff --git a/libnm-util/nm-param-spec-specialized.c b/libnm-util/nm-param-spec-specialized.c
index fc8d0318af..dfc8ea9874 100644
--- a/libnm-util/nm-param-spec-specialized.c
+++ b/libnm-util/nm-param-spec-specialized.c
@@ -38,7 +38,7 @@ struct _NMParamSpecSpecialized {
/*****************************************************************************/
/* _gvalues_compare */
-static gint _gvalues_compare (const GValue *value1, const GValue *value2);
+static int _gvalues_compare (const GValue *value1, const GValue *value2);
static gboolean
type_is_fixed_size (GType type, gsize *tsize)
@@ -54,13 +54,13 @@ type_is_fixed_size (GType type, gsize *tsize)
if (tsize) *tsize = sizeof (gboolean);
return TRUE;
case G_TYPE_LONG:
- if (tsize) *tsize = sizeof (glong);
+ if (tsize) *tsize = sizeof (long);
return TRUE;
case G_TYPE_ULONG:
if (tsize) *tsize = sizeof (gulong);
return TRUE;
case G_TYPE_INT:
- if (tsize) *tsize = sizeof (gint);
+ if (tsize) *tsize = sizeof (int);
return TRUE;
case G_TYPE_UINT:
if (tsize) *tsize = sizeof (guint);
@@ -72,10 +72,10 @@ type_is_fixed_size (GType type, gsize *tsize)
if (tsize) *tsize = sizeof (guint64);
return TRUE;
case G_TYPE_FLOAT:
- if (tsize) *tsize = sizeof (gfloat);
+ if (tsize) *tsize = sizeof (float);
return TRUE;
case G_TYPE_DOUBLE:
- if (tsize) *tsize = sizeof (gdouble);
+ if (tsize) *tsize = sizeof (double);
return TRUE;
default:
return FALSE;
@@ -84,15 +84,15 @@ type_is_fixed_size (GType type, gsize *tsize)
#define FLOAT_FACTOR 0.00000001
-static gint
+static int
_gvalues_compare_fixed (const GValue *value1, const GValue *value2)
{
int ret = 0;
switch (G_VALUE_TYPE (value1)) {
case G_TYPE_CHAR: {
- gchar val1 = g_value_get_schar (value1);
- gchar val2 = g_value_get_schar (value2);
+ char val1 = g_value_get_schar (value1);
+ char val2 = g_value_get_schar (value2);
if (val1 != val2)
ret = val1 < val2 ? -1 : val1 > val2;
break;
@@ -112,8 +112,8 @@ _gvalues_compare_fixed (const GValue *value1, const GValue *value2)
break;
}
case G_TYPE_LONG: {
- glong val1 = g_value_get_long (value1);
- glong val2 = g_value_get_long (value2);
+ long val1 = g_value_get_long (value1);
+ long val2 = g_value_get_long (value2);
if (val1 != val2)
ret = val1 < val2 ? -1 : val1 > val2;
break;
@@ -126,8 +126,8 @@ _gvalues_compare_fixed (const GValue *value1, const GValue *value2)
break;
}
case G_TYPE_INT: {
- gint val1 = g_value_get_int (value1);
- gint val2 = g_value_get_int (value2);
+ int val1 = g_value_get_int (value1);
+ int val2 = g_value_get_int (value2);
if (val1 != val2)
ret = val1 < val2 ? -1 : val1 > val2;
break;
@@ -154,8 +154,8 @@ _gvalues_compare_fixed (const GValue *value1, const GValue *value2)
break;
}
case G_TYPE_FLOAT: {
- gfloat val1 = g_value_get_float (value1);
- gfloat val2 = g_value_get_float (value2);
+ float val1 = g_value_get_float (value1);
+ float val2 = g_value_get_float (value2);
float diff = val1 - val2;
/* Can't use == or != here due to inexactness of FP */
@@ -164,8 +164,8 @@ _gvalues_compare_fixed (const GValue *value1, const GValue *value2)
break;
}
case G_TYPE_DOUBLE: {
- gdouble val1 = g_value_get_double (value1);
- gdouble val2 = g_value_get_double (value2);
+ double val1 = g_value_get_double (value1);
+ double val2 = g_value_get_double (value2);
double diff = val1 - val2;
if (diff > FLOAT_FACTOR || diff < -FLOAT_FACTOR)
@@ -179,7 +179,7 @@ _gvalues_compare_fixed (const GValue *value1, const GValue *value2)
return ret;
}
-static gint
+static int
_gvalues_compare_string (const GValue *value1, const GValue *value2)
{
const char *str1 = g_value_get_string (value1);
@@ -196,12 +196,12 @@ _gvalues_compare_string (const GValue *value1, const GValue *value2)
return strcmp (str1, str2);
}
-static gint
+static int
_gvalues_compare_strv (const GValue *value1, const GValue *value2)
{
char **strv1;
char **strv2;
- gint ret;
+ int ret;
guint i = 0;
strv1 = (char **) g_value_get_boxed (value1);
@@ -252,10 +252,10 @@ iterate_collection (const GValue *value, gpointer user_data)
*list = g_slist_prepend (*list, _gvalue_dup (value));
}
-static gint
+static int
_gvalues_compare_collection (const GValue *value1, const GValue *value2)
{
- gint ret;
+ int ret;
guint len1;
guint len2;
GType value_type = dbus_g_type_get_collection_specialization (G_VALUE_TYPE (value1));
@@ -312,7 +312,7 @@ iterate_map (const GValue *key_val,
typedef struct {
GHashTable *hash2;
- gint ret;
+ int ret;
} CompareMapInfo;
static void
@@ -331,14 +331,14 @@ compare_one_map_item (gpointer key, gpointer val, gpointer user_data)
info->ret = 1;
}
-static gint
+static int
_gvalues_compare_map (const GValue *value1, const GValue *value2)
{
GHashTable *hash1 = NULL;
GHashTable *hash2 = NULL;
guint len1;
guint len2;
- gint ret = 0;
+ int ret = 0;
if (dbus_g_type_get_map_key_specialization (G_VALUE_TYPE (value1)) != G_TYPE_STRING) {
g_warning ("Can not compare maps with '%s' for keys",
@@ -371,7 +371,7 @@ _gvalues_compare_map (const GValue *value1, const GValue *value2)
return ret;
}
-static gint
+static int
_gvalue_ip6_address_compare (const GValue *value1, const GValue *value2)
{
GValueArray *values1, *values2;
@@ -379,7 +379,7 @@ _gvalue_ip6_address_compare (const GValue *value1, const GValue *value2)
GByteArray *addr1, *addr2;
guint32 prefix1, prefix2;
GByteArray *gw1, *gw2;
- gint ret = 0;
+ int ret = 0;
int i;
/* IP6 addresses are GValueArrays (see nm-dbus-glib-types.h) */
@@ -429,7 +429,7 @@ _gvalue_ip6_address_compare (const GValue *value1, const GValue *value2)
return ret;
}
-static gint
+static int
_gvalue_ip6_route_compare (const GValue *value1, const GValue *value2)
{
GValueArray *values1, *values2;
@@ -438,7 +438,7 @@ _gvalue_ip6_route_compare (const GValue *value1, const GValue *value2)
GByteArray *next_hop1, *next_hop2;
guint32 prefix1, prefix2;
guint32 metric1, metric2;
- gint ret = 0;
+ int ret = 0;
int i;
/* IP6 routes are GValueArrays (see nm-dbus-glib-types.h) */
@@ -491,7 +491,7 @@ _gvalue_ip6_route_compare (const GValue *value1, const GValue *value2)
return ret;
}
-static gint
+static int
_gvalues_compare_struct (const GValue *value1, const GValue *value2)
{
/* value1 and value2 must contain the same type since
@@ -508,12 +508,12 @@ _gvalues_compare_struct (const GValue *value1, const GValue *value2)
}
}
-gint
+int
_gvalues_compare (const GValue *value1, const GValue *value2)
{
GType type1;
GType type2;
- gint ret;
+ int ret;
if (value1 == value2)
return 0;
@@ -592,7 +592,7 @@ param_specialized_validate (GParamSpec *pspec, GValue *value)
return changed;
}
-static gint
+static int
param_specialized_values_cmp (GParamSpec *pspec,
const GValue *value1,
const GValue *value2)
diff --git a/libnm-util/nm-setting-bond.c b/libnm-util/nm-setting-bond.c
index 5a9b963451..a54e93c3a5 100644
--- a/libnm-util/nm-setting-bond.c
+++ b/libnm-util/nm-setting-bond.c
@@ -222,7 +222,7 @@ nm_setting_bond_get_option (NMSettingBond *setting,
static gboolean
validate_int (const char *name, const char *value, const BondDefault *def)
{
- glong num;
+ long num;
guint i;
for (i = 0; i < strlen (value); i++) {
diff --git a/libnm-util/nm-setting-dcb.c b/libnm-util/nm-setting-dcb.c
index 2cd0bdafdb..17a3a87165 100644
--- a/libnm-util/nm-setting-dcb.c
+++ b/libnm-util/nm-setting-dcb.c
@@ -75,14 +75,14 @@ NM_SETTING_REGISTER_TYPE (NM_TYPE_SETTING_DCB)
typedef struct {
NMSettingDcbFlags app_fcoe_flags;
- gint app_fcoe_priority;
+ int app_fcoe_priority;
char * app_fcoe_mode;
NMSettingDcbFlags app_iscsi_flags;
- gint app_iscsi_priority;
+ int app_iscsi_priority;
NMSettingDcbFlags app_fip_flags;
- gint app_fip_priority;
+ int app_fip_priority;
/* Priority Flow Control */
NMSettingDcbFlags pfc_flags;
@@ -161,7 +161,7 @@ nm_setting_dcb_get_app_fcoe_flags (NMSettingDcb *setting)
*
* Since: 0.9.10
**/
-gint
+int
nm_setting_dcb_get_app_fcoe_priority (NMSettingDcb *setting)
{
g_return_val_if_fail (NM_IS_SETTING_DCB (setting), 0);
@@ -209,7 +209,7 @@ nm_setting_dcb_get_app_iscsi_flags (NMSettingDcb *setting)
*
* Since: 0.9.10
**/
-gint
+int
nm_setting_dcb_get_app_iscsi_priority (NMSettingDcb *setting)
{
g_return_val_if_fail (NM_IS_SETTING_DCB (setting), 0);
@@ -241,7 +241,7 @@ nm_setting_dcb_get_app_fip_flags (NMSettingDcb *setting)
*
* Since: 0.9.10
**/
-gint
+int
nm_setting_dcb_get_app_fip_priority (NMSettingDcb *setting)
{
g_return_val_if_fail (NM_IS_SETTING_DCB (setting), 0);
@@ -665,7 +665,7 @@ check_uint_array (const guint *array,
}
static gboolean
-check_priority (gint val,
+check_priority (int val,
NMSettingDcbFlags flags,
const char *prop_name,
GError **error)
diff --git a/libnm-util/nm-setting-dcb.h b/libnm-util/nm-setting-dcb.h
index 2757200e9d..04863545ca 100644
--- a/libnm-util/nm-setting-dcb.h
+++ b/libnm-util/nm-setting-dcb.h
@@ -130,14 +130,14 @@ NM_AVAILABLE_IN_0_9_10
NMSetting * nm_setting_dcb_new (void);
NMSettingDcbFlags nm_setting_dcb_get_app_fcoe_flags (NMSettingDcb *setting);
-gint nm_setting_dcb_get_app_fcoe_priority (NMSettingDcb *setting);
+int nm_setting_dcb_get_app_fcoe_priority (NMSettingDcb *setting);
const char * nm_setting_dcb_get_app_fcoe_mode (NMSettingDcb *setting);
NMSettingDcbFlags nm_setting_dcb_get_app_iscsi_flags (NMSettingDcb *setting);
-gint nm_setting_dcb_get_app_iscsi_priority (NMSettingDcb *setting);
+int nm_setting_dcb_get_app_iscsi_priority (NMSettingDcb *setting);
NMSettingDcbFlags nm_setting_dcb_get_app_fip_flags (NMSettingDcb *setting);
-gint nm_setting_dcb_get_app_fip_priority (NMSettingDcb *setting);
+int nm_setting_dcb_get_app_fip_priority (NMSettingDcb *setting);
/* Priority Flow Control */
NMSettingDcbFlags nm_setting_dcb_get_priority_flow_control_flags (NMSettingDcb *setting);
diff --git a/libnm-util/nm-setting-private.h b/libnm-util/nm-setting-private.h
index e2e0239885..9b8e946454 100644
--- a/libnm-util/nm-setting-private.h
+++ b/libnm-util/nm-setting-private.h
@@ -58,7 +58,7 @@ gboolean _nm_setting_type_is_base_type (GType type);
guint32 _nm_setting_get_setting_priority (NMSetting *setting);
GType _nm_setting_lookup_setting_type (const char *name);
GType _nm_setting_lookup_setting_type_by_quark (GQuark error_quark);
-gint _nm_setting_compare_priority (gconstpointer a, gconstpointer b);
+int _nm_setting_compare_priority (gconstpointer a, gconstpointer b);
gboolean _nm_setting_get_property (NMSetting *setting, const char *name, GValue *value);
@@ -113,8 +113,8 @@ NMSettingVerifyResult _nm_setting_verify_deprecated_virtual_iface_name (const ch
const char *setting_name,
const char *setting_property,
GQuark error_quark,
- gint e_invalid_property,
- gint e_missing_property,
+ int e_invalid_property,
+ int e_missing_property,
GSList *all_settings,
GError **error);
diff --git a/libnm-util/nm-setting-vlan.c b/libnm-util/nm-setting-vlan.c
index 3cddb3f904..f835e07f4c 100644
--- a/libnm-util/nm-setting-vlan.c
+++ b/libnm-util/nm-setting-vlan.c
@@ -174,7 +174,7 @@ static PriorityMap *
priority_map_new_from_str (NMVlanPriorityMap map, const char *str)
{
PriorityMap *p = NULL;
- gchar **t = NULL;
+ char **t = NULL;
guint32 len;
guint64 from, to;
diff --git a/libnm-util/nm-setting.c b/libnm-util/nm-setting.c
index c74d2d7116..36d6dab1a3 100644
--- a/libnm-util/nm-setting.c
+++ b/libnm-util/nm-setting.c
@@ -270,7 +270,7 @@ _nm_setting_lookup_setting_type_by_quark (GQuark error_quark)
return G_TYPE_INVALID;
}
-gint
+int
_nm_setting_compare_priority (gconstpointer a, gconstpointer b)
{
guint32 prio_a, prio_b;
@@ -466,7 +466,7 @@ nm_setting_duplicate (NMSetting *setting)
return NM_SETTING (dup);
}
-static gint
+static int
find_setting_by_name (gconstpointer a, gconstpointer b)
{
NMSetting *setting = NM_SETTING (a);
@@ -616,7 +616,7 @@ nm_setting_compare (NMSetting *a,
{
GParamSpec **property_specs;
guint n_property_specs;
- gint same = TRUE;
+ int same = TRUE;
guint i;
g_return_val_if_fail (NM_IS_SETTING (a), FALSE);
@@ -1335,8 +1335,8 @@ _nm_setting_verify_deprecated_virtual_iface_name (const char *interface_name,
const char *setting_name,
const char *setting_property,
GQuark error_quark,
- gint e_invalid_property,
- gint e_missing_property,
+ int e_invalid_property,
+ int e_missing_property,
GSList *all_settings,
GError **error)
{
diff --git a/libnm-util/nm-setting.h b/libnm-util/nm-setting.h
index 1470a69b24..d235efbd4e 100644
--- a/libnm-util/nm-setting.h
+++ b/libnm-util/nm-setting.h
@@ -182,7 +182,7 @@ typedef struct {
GObjectClass parent;
/* Virtual functions */
- gint (*verify) (NMSetting *setting,
+ int (*verify) (NMSetting *setting,
GSList *all_settings,
GError **error);
diff --git a/libnm-util/nm-utils.c b/libnm-util/nm-utils.c
index 2af9432fee..26f5533a28 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 gchar *) ssid->data, ssid->len, NULL))
- return g_strndup ((const gchar *) ssid->data, ssid->len);
+ if (g_utf8_validate ((const char *) ssid->data, ssid->len, NULL))
+ return g_strndup ((const char *) 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 gchar *) ssid->data, ssid->len, "UTF-8", e1, NULL, NULL, NULL);
+ converted = g_convert ((const char *) ssid->data, ssid->len, "UTF-8", e1, NULL, NULL, NULL);
if (!converted && e2)
- converted = g_convert ((const gchar *) ssid->data, ssid->len, "UTF-8", e2, NULL, NULL, NULL);
+ converted = g_convert ((const char *) ssid->data, ssid->len, "UTF-8", e2, NULL, NULL, NULL);
if (!converted && e3)
- converted = g_convert ((const gchar *) ssid->data, ssid->len, "UTF-8", e3, NULL, NULL, NULL);
+ converted = g_convert ((const char *) ssid->data, ssid->len, "UTF-8", e3, NULL, NULL, NULL);
if (!converted) {
- converted = g_convert_with_fallback ((const gchar *) ssid->data, ssid->len,
+ converted = g_convert_with_fallback ((const char *) 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 */
- gchar *valid_chars = " !\"#$%&'()*+,-./0123456789:;<=>?@"
+ char *valid_chars = " !\"#$%&'()*+,-./0123456789:;<=>?@"
"ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`"
"abcdefghijklmnopqrstuvwxyz{|}~";
- converted = g_strndup ((const gchar *)ssid->data, ssid->len);
+ converted = g_strndup ((const char *)ssid->data, ssid->len);
g_strcanon (converted, valid_chars, '?');
}
diff --git a/libnm/nm-access-point.c b/libnm/nm-access-point.c
index 75ea557058..1cac12f9bb 100644
--- a/libnm/nm-access-point.c
+++ b/libnm/nm-access-point.c
@@ -48,7 +48,7 @@ typedef struct {
NM80211Mode mode;
guint32 max_bitrate;
guint8 strength;
- gint last_seen;
+ int last_seen;
} NMAccessPointPrivate;
enum {
@@ -233,14 +233,14 @@ nm_access_point_get_strength (NMAccessPoint *ap)
*
* Since: 1.2
**/
-gint
+int
nm_access_point_get_last_seen (NMAccessPoint *ap)
{
g_return_val_if_fail (NM_IS_ACCESS_POINT (ap), -1);
return NM_ACCESS_POINT_GET_PRIVATE (ap)->last_seen;
}
-NM_BACKPORT_SYMBOL (libnm_1_0_6, gint, nm_access_point_get_last_seen, (NMAccessPoint *ap), (ap));
+NM_BACKPORT_SYMBOL (libnm_1_0_6, int, nm_access_point_get_last_seen, (NMAccessPoint *ap), (ap));
/**
* nm_access_point_connection_valid:
diff --git a/libnm/nm-access-point.h b/libnm/nm-access-point.h
index 177b6a9aa8..dccf2fe531 100644
--- a/libnm/nm-access-point.h
+++ b/libnm/nm-access-point.h
@@ -77,7 +77,7 @@ NM80211Mode nm_access_point_get_mode (NMAccessPoint *ap);
guint32 nm_access_point_get_max_bitrate (NMAccessPoint *ap);
guint8 nm_access_point_get_strength (NMAccessPoint *ap);
NM_AVAILABLE_IN_1_2
-gint nm_access_point_get_last_seen (NMAccessPoint *ap);
+int nm_access_point_get_last_seen (NMAccessPoint *ap);
GPtrArray * nm_access_point_filter_connections (NMAccessPoint *ap,
const GPtrArray *connections);
diff --git a/libnm/nm-client.c b/libnm/nm-client.c
index 543dd4e8ea..cdf8bf13f9 100644
--- a/libnm/nm-client.c
+++ b/libnm/nm-client.c
@@ -2465,8 +2465,8 @@ nm_client_checkpoint_adjust_rollback_timeout_finish (NMClient *client,
static GType
proxy_type (GDBusObjectManagerClient *manager,
- const gchar *object_path,
- const gchar *interface_name,
+ const char *object_path,
+ const char *interface_name,
gpointer user_data)
{
/* ObjectManager asks us for an object proxy. Unfortunatelly, we can't
@@ -3798,4 +3798,4 @@ NM_BACKPORT_SYMBOL (libnm_1_0_6, gboolean, nm_utils_enum_from_str,
(GType type, const char *str, int *out_value, char **err_token),
(type, str, out_value, err_token));
-NM_BACKPORT_SYMBOL (libnm_1_2_4, gint, nm_setting_ip_config_get_dns_priority, (NMSettingIPConfig *setting), (setting));
+NM_BACKPORT_SYMBOL (libnm_1_2_4, int, nm_setting_ip_config_get_dns_priority, (NMSettingIPConfig *setting), (setting));
diff --git a/libnm/nm-dbus-helpers.c b/libnm/nm-dbus-helpers.c
index 90818a14c8..33c6819148 100644
--- a/libnm/nm-dbus-helpers.c
+++ b/libnm/nm-dbus-helpers.c
@@ -115,7 +115,7 @@ _nm_dbus_proxy_replace_match (GDBusProxy *proxy)
{
GDBusConnection *connection = g_dbus_proxy_get_connection (proxy);
static unsigned match_counter = 1024;
- gchar *match;
+ char *match;
if (match_counter == 1) {
/* If we hit the low matches watermark, install a
diff --git a/libnm/nm-device-wimax.c b/libnm/nm-device-wimax.c
index 7134024f32..08624594a3 100644
--- a/libnm/nm-device-wimax.c
+++ b/libnm/nm-device-wimax.c
@@ -45,9 +45,9 @@ typedef struct {
GPtrArray *nsps;
guint center_freq;
- gint rssi;
- gint cinr;
- gint tx_power;
+ int rssi;
+ int cinr;
+ int tx_power;
char *bsid;
} NMDeviceWimaxPrivate;
@@ -235,7 +235,7 @@ nm_device_wimax_get_center_frequency (NMDeviceWimax *self)
*
* Deprecated: 1.2: WiMAX is no longer supported.
**/
-gint
+int
nm_device_wimax_get_rssi (NMDeviceWimax *self)
{
g_return_val_if_fail (NM_IS_DEVICE_WIMAX (self), 0);
@@ -255,7 +255,7 @@ nm_device_wimax_get_rssi (NMDeviceWimax *self)
*
* Deprecated: 1.2: WiMAX is no longer supported.
**/
-gint
+int
nm_device_wimax_get_cinr (NMDeviceWimax *self)
{
g_return_val_if_fail (NM_IS_DEVICE_WIMAX (self), 0);
@@ -275,7 +275,7 @@ nm_device_wimax_get_cinr (NMDeviceWimax *self)
*
* Deprecated: 1.2: WiMAX is no longer supported.
**/
-gint
+int
nm_device_wimax_get_tx_power (NMDeviceWimax *self)
{
g_return_val_if_fail (NM_IS_DEVICE_WIMAX (self), 0);
diff --git a/libnm/nm-device-wimax.h b/libnm/nm-device-wimax.h
index cc3fc6e1d3..3b50ac6b29 100644
--- a/libnm/nm-device-wimax.h
+++ b/libnm/nm-device-wimax.h
@@ -81,11 +81,11 @@ const GPtrArray *nm_device_wimax_get_nsps (NMDeviceWimax *wimax);
NM_DEPRECATED_IN_1_2
guint nm_device_wimax_get_center_frequency (NMDeviceWimax *self);
NM_DEPRECATED_IN_1_2
-gint nm_device_wimax_get_rssi (NMDeviceWimax *self);
+int nm_device_wimax_get_rssi (NMDeviceWimax *self);
NM_DEPRECATED_IN_1_2
-gint nm_device_wimax_get_cinr (NMDeviceWimax *self);
+int nm_device_wimax_get_cinr (NMDeviceWimax *self);
NM_DEPRECATED_IN_1_2
-gint nm_device_wimax_get_tx_power (NMDeviceWimax *self);
+int nm_device_wimax_get_tx_power (NMDeviceWimax *self);
NM_DEPRECATED_IN_1_2
const char * nm_device_wimax_get_bsid (NMDeviceWimax *self);
diff --git a/libnm/nm-dns-manager.c b/libnm/nm-dns-manager.c
index b833d0c638..37117b723e 100644
--- a/libnm/nm-dns-manager.c
+++ b/libnm/nm-dns-manager.c
@@ -277,7 +277,7 @@ demarshal_dns_configuration (NMObject *object, GParamSpec *pspec, GVariant *valu
char **nameservers = NULL, **domains = NULL;
gboolean vpn = FALSE;
char *interface = NULL, *str;
- gint priority;
+ int priority;
if ( !g_variant_lookup (entry_var, "nameservers", "as", &iterp)
|| !g_variant_lookup (entry_var, "priority", "i", &priority)) {
diff --git a/libnm/nm-object.c b/libnm/nm-object.c
index da2fbb79c0..dbcdb86837 100644
--- a/libnm/nm-object.c
+++ b/libnm/nm-object.c
@@ -197,7 +197,7 @@ deferred_notify_cb (gpointer data)
c_list_for_each (iter, &props) {
NotifyItem *item = c_list_entry (iter, NotifyItem, lst);
char buf[50];
- gint ret = 0;
+ int ret = 0;
switch (item->pending) {
case NOTIFY_SIGNAL_PENDING_ADDED:
@@ -893,10 +893,10 @@ demarshal_generic (NMObject *object,
HANDLE_TYPE (G_VARIANT_TYPE_BYTE, guchar, g_variant_get_byte);
else if (pspec->value_type == G_TYPE_DOUBLE) {
NM_PRAGMA_WARNING_DISABLE("-Wfloat-equal")
- HANDLE_TYPE (G_VARIANT_TYPE_DOUBLE, gdouble, g_variant_get_double);
+ HANDLE_TYPE (G_VARIANT_TYPE_DOUBLE, double, g_variant_get_double);
NM_PRAGMA_WARNING_REENABLE
} else if (pspec->value_type == G_TYPE_INT)
- HANDLE_TYPE (G_VARIANT_TYPE_INT32, gint, g_variant_get_int32);
+ HANDLE_TYPE (G_VARIANT_TYPE_INT32, int, g_variant_get_int32);
else if (pspec->value_type == G_TYPE_UINT)
HANDLE_TYPE (G_VARIANT_TYPE_UINT32, guint, g_variant_get_uint32);
else if (pspec->value_type == G_TYPE_INT64)
@@ -904,7 +904,7 @@ demarshal_generic (NMObject *object,
else if (pspec->value_type == G_TYPE_UINT64)
HANDLE_TYPE (G_VARIANT_TYPE_UINT64, guint64, g_variant_get_uint64);
else if (pspec->value_type == G_TYPE_LONG)
- HANDLE_TYPE (G_VARIANT_TYPE_INT64, glong, g_variant_get_int64);
+ HANDLE_TYPE (G_VARIANT_TYPE_INT64, long, g_variant_get_int64);
else if (pspec->value_type == G_TYPE_ULONG)
HANDLE_TYPE (G_VARIANT_TYPE_UINT64, gulong, g_variant_get_uint64);
else {
@@ -1037,10 +1037,10 @@ init_dbus (NMObject *object)
static void
init_if (GDBusProxy *proxy, NMObject *self)
{
- gchar **props;
+ char **props;
char **prop;
GVariant *val;
- gchar *str;
+ char *str;
nm_assert (G_IS_DBUS_PROXY (proxy));
nm_assert (NM_IS_OBJECT (self));
diff --git a/libnm/nm-vpn-service-plugin.c b/libnm/nm-vpn-service-plugin.c
index da4c2446cd..e9232e702c 100644
--- a/libnm/nm-vpn-service-plugin.c
+++ b/libnm/nm-vpn-service-plugin.c
@@ -478,10 +478,10 @@ connect_timer_start (NMVpnServicePlugin *plugin)
static void
peer_vanished (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)
{
@@ -493,7 +493,7 @@ watch_peer (NMVpnServicePlugin *plugin,
GDBusMethodInvocation *context)
{
GDBusConnection *connection = g_dbus_method_invocation_get_connection (context);
- const gchar *peer = g_dbus_message_get_sender (g_dbus_method_invocation_get_message (context));
+ const char *peer = g_dbus_message_get_sender (g_dbus_method_invocation_get_message (context));
return g_dbus_connection_signal_subscribe (connection,
"org.freedesktop.DBus",
@@ -784,7 +784,7 @@ nm_vpn_service_plugin_read_vpn_details (int fd,
gboolean success = FALSE;
char *key = NULL, *val = NULL;
nm_auto_free_gstring GString *line = NULL;
- gchar c;
+ char c;
if (out_data)
g_return_val_if_fail (*out_data == NULL, FALSE);
diff --git a/libnm/tests/test-secret-agent.c b/libnm/tests/test-secret-agent.c
index 746a9e6437..53110be6cd 100644
--- a/libnm/tests/test-secret-agent.c
+++ b/libnm/tests/test-secret-agent.c
@@ -111,8 +111,8 @@ done:
static void
test_secret_agent_cancel_get_secrets (NMSecretAgentOld *agent,
- const gchar *connection_path,
- const gchar *setting_name)
+ const char *connection_path,
+ const char *setting_name)
{
g_assert_not_reached ();
}
@@ -120,7 +120,7 @@ test_secret_agent_cancel_get_secrets (NMSecretAgentOld *agent,
static void
test_secret_agent_save_secrets (NMSecretAgentOld *agent,
NMConnection *connection,
- const gchar *connection_path,
+ const char *connection_path,
NMSecretAgentOldSaveSecretsFunc callback,
gpointer callback_data)
{
@@ -130,7 +130,7 @@ test_secret_agent_save_secrets (NMSecretAgentOld *agent,
static void
test_secret_agent_delete_secrets (NMSecretAgentOld *agent,
NMConnection *connection,
- const gchar *connection_path,
+ const char *connection_path,
NMSecretAgentOldDeleteSecretsFunc callback,
gpointer callback_data)
{
diff --git a/shared/nm-test-utils-impl.c b/shared/nm-test-utils-impl.c
index 9e7312ca5a..1da9014e19 100644
--- a/shared/nm-test-utils-impl.c
+++ b/shared/nm-test-utils-impl.c
@@ -98,7 +98,7 @@ _service_init_wait_probe_name (gpointer user_data)
static void
_service_init_wait_child_wait (GPid pid,
- gint status,
+ int status,
gpointer user_data)
{
ServiceInitWaitData *data = user_data;
diff --git a/shared/nm-utils/nm-enum-utils.c b/shared/nm-utils/nm-enum-utils.c
index b83c42078e..a4f6e809da 100644
--- a/shared/nm-utils/nm-enum-utils.c
+++ b/shared/nm-utils/nm-enum-utils.c
@@ -323,11 +323,11 @@ _nm_utils_enum_from_str_full (GType type,
}
const char **
-_nm_utils_enum_get_values (GType type, gint from, gint to)
+_nm_utils_enum_get_values (GType type, int from, int to)
{
GTypeClass *klass;
GPtrArray *array;
- gint i;
+ int i;
char sbuf[64];
klass = g_type_class_ref (type);
diff --git a/shared/nm-utils/nm-enum-utils.h b/shared/nm-utils/nm-enum-utils.h
index d6dae859ad..1827fdf4b3 100644
--- a/shared/nm-utils/nm-enum-utils.h
+++ b/shared/nm-utils/nm-enum-utils.h
@@ -41,7 +41,7 @@ gboolean _nm_utils_enum_from_str_full (GType type,
char **err_token,
const NMUtilsEnumValueInfo *value_infos);
-const char **_nm_utils_enum_get_values (GType type, gint from, gint to);
+const char **_nm_utils_enum_get_values (GType type, int from, int to);
/*****************************************************************************/
diff --git a/shared/nm-utils/nm-glib.h b/shared/nm-utils/nm-glib.h
index fd7865195c..b4d8905564 100644
--- a/shared/nm-utils/nm-glib.h
+++ b/shared/nm-utils/nm-glib.h
@@ -175,7 +175,7 @@ nm_glib_check_version (guint major, guint minor, guint micro)
/* g_test_skip() is only available since glib 2.38. Add a compatibility wrapper. */
static inline void
-__nmtst_g_test_skip (const gchar *msg)
+__nmtst_g_test_skip (const char *msg)
{
#if GLIB_CHECK_VERSION (2, 38, 0)
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
@@ -280,16 +280,16 @@ nm_g_hash_table_add (GHashTable *hash, gpointer key)
#if !GLIB_CHECK_VERSION(2, 40, 0) || defined (NM_GLIB_COMPAT_H_TEST)
static inline void
_nm_g_ptr_array_insert (GPtrArray *array,
- gint index_,
+ int index_,
gpointer data)
{
g_return_if_fail (array);
g_return_if_fail (index_ >= -1);
- g_return_if_fail (index_ <= (gint) array->len);
+ g_return_if_fail (index_ <= (int) array->len);
g_ptr_array_add (array, data);
- if (index_ != -1 && index_ != (gint) (array->len - 1)) {
+ if (index_ != -1 && index_ != (int) (array->len - 1)) {
memmove (&(array->pdata[index_ + 1]),
&(array->pdata[index_]),
(array->len - index_ - 1) * sizeof (gpointer));
@@ -314,10 +314,10 @@ _nm_g_ptr_array_insert (GPtrArray *array,
#if !GLIB_CHECK_VERSION (2, 40, 0)
static inline gboolean
_g_key_file_save_to_file (GKeyFile *key_file,
- const gchar *filename,
+ const char *filename,
GError **error)
{
- gchar *contents;
+ char *contents;
gboolean success;
gsize length;
@@ -440,8 +440,8 @@ g_steal_pointer (gpointer pp)
/*****************************************************************************/
static inline gboolean
-_nm_g_strv_contains (const gchar * const *strv,
- const gchar *str)
+_nm_g_strv_contains (const char * const *strv,
+ const char *str)
{
#if !GLIB_CHECK_VERSION(2, 44, 0)
g_return_val_if_fail (strv != NULL, FALSE);
@@ -464,7 +464,7 @@ _nm_g_strv_contains (const gchar * const *strv,
/*****************************************************************************/
static inline GVariant *
-_nm_g_variant_new_take_string (gchar *string)
+_nm_g_variant_new_take_string (char *string)
{
#if !GLIB_CHECK_VERSION(2, 36, 0)
GVariant *value;
diff --git a/shared/nm-utils/nm-macros-internal.h b/shared/nm-utils/nm-macros-internal.h
index ef3039e642..e60bacebdc 100644
--- a/shared/nm-utils/nm-macros-internal.h
+++ b/shared/nm-utils/nm-macros-internal.h
@@ -1261,7 +1261,7 @@ nm_decode_version (guint version, guint *major, guint *minor, guint *micro)
* Using _Bool has advantages over gboolean:
*
* - commonly _Bool is one byte large, instead of gboolean's 4 bytes (because gboolean
- * is a typedef for gint). Especially when having boolean fields in a struct, we can
+ * is a typedef for int). Especially when having boolean fields in a struct, we can
* thereby easily save some space.
*
* - _Bool type guarantees that two "true" expressions compare equal. E.g. the follwing
diff --git a/shared/nm-utils/nm-shared-utils.c b/shared/nm-utils/nm-shared-utils.c
index d0019c1174..1b76b2d794 100644
--- a/shared/nm-utils/nm-shared-utils.c
+++ b/shared/nm-utils/nm-shared-utils.c
@@ -97,7 +97,7 @@ nm_utils_strbuf_append (char **buf, gsize *len, const char *format, ...)
{
char *p = *buf;
va_list args;
- gint retval;
+ int retval;
if (*len == 0)
return;
@@ -840,9 +840,9 @@ _nm_utils_strv_cleanup (char **strv,
/*****************************************************************************/
-gint
+int
_nm_utils_ascii_str_to_bool (const char *str,
- gint default_value)
+ int default_value)
{
gsize len;
char *s = NULL;
@@ -924,7 +924,7 @@ nm_utils_error_is_cancelled (GError *error,
*/
gboolean
nm_g_object_set_property (GObject *object,
- const gchar *property_name,
+ const char *property_name,
const GValue *value,
GError **error)
{
@@ -999,7 +999,7 @@ nm_g_object_set_property (GObject *object,
gboolean
nm_g_object_set_property_boolean (GObject *object,
- const gchar *property_name,
+ const char *property_name,
gboolean value,
GError **error)
{
@@ -1012,7 +1012,7 @@ nm_g_object_set_property_boolean (GObject *object,
gboolean
nm_g_object_set_property_uint (GObject *object,
- const gchar *property_name,
+ const char *property_name,
guint value,
GError **error)
{
@@ -1369,10 +1369,10 @@ nm_utils_get_start_time_for_pid (pid_t pid, char *out_state, pid_t *out_ppid)
{
guint64 start_time;
char filename[256];
- gs_free gchar *contents = NULL;
+ gs_free char *contents = NULL;
size_t length;
gs_free const char **tokens = NULL;
- gchar *p;
+ char *p;
char state = ' ';
gint64 ppid = 0;
diff --git a/shared/nm-utils/nm-shared-utils.h b/shared/nm-utils/nm-shared-utils.h
index d983cfcd1c..0bac6e4a53 100644
--- a/shared/nm-utils/nm-shared-utils.h
+++ b/shared/nm-utils/nm-shared-utils.h
@@ -247,8 +247,8 @@ gboolean nm_utils_parse_inaddr_prefix (int addr_family,
gint64 _nm_utils_ascii_str_to_int64 (const char *str, guint base, gint64 min, gint64 max, gint64 fallback);
-gint _nm_utils_ascii_str_to_bool (const char *str,
- gint default_value);
+int _nm_utils_ascii_str_to_bool (const char *str,
+ int default_value);
/*****************************************************************************/
@@ -406,17 +406,17 @@ gboolean nm_utils_error_is_cancelled (GError *error,
/*****************************************************************************/
gboolean nm_g_object_set_property (GObject *object,
- const gchar *property_name,
+ const char *property_name,
const GValue *value,
GError **error);
gboolean nm_g_object_set_property_boolean (GObject *object,
- const gchar *property_name,
+ const char *property_name,
gboolean value,
GError **error);
gboolean nm_g_object_set_property_uint (GObject *object,
- const gchar *property_name,
+ const char *property_name,
guint value,
GError **error);
diff --git a/shared/nm-utils/nm-test-utils.h b/shared/nm-utils/nm-test-utils.h
index 0218b23877..0faa1a4a1e 100644
--- a/shared/nm-utils/nm-test-utils.h
+++ b/shared/nm-utils/nm-test-utils.h
@@ -299,9 +299,9 @@ nmtst_free (void)
}
static inline void
-_nmtst_log_handler (const gchar *log_domain,
+_nmtst_log_handler (const char *log_domain,
GLogLevelFlags log_level,
- const gchar *message,
+ const char *message,
gpointer user_data)
{
g_print ("%s\n", message);
@@ -811,7 +811,7 @@ nmtst_get_rand (void)
const char *str;
if ((str = g_getenv ("NMTST_SEED_RAND"))) {
- gchar *s;
+ char *s;
gint64 i;
i = g_ascii_strtoll (str, &s, 0);
@@ -1181,12 +1181,12 @@ _nmtst_assert_ip6_address (const char *file, int line, const struct in6_addr *ad
#define nmtst_spawn_sync(working_directory, standard_out, standard_err, assert_exit_status, ...) \
__nmtst_spawn_sync (working_directory, standard_out, standard_err, assert_exit_status, ##__VA_ARGS__, NULL)
-static inline gint
+static inline int
__nmtst_spawn_sync (const char *working_directory, char **standard_out, char **standard_err, int assert_exit_status, ...) G_GNUC_NULL_TERMINATED;
-static inline gint
+static inline int
__nmtst_spawn_sync (const char *working_directory, char **standard_out, char **standard_err, int assert_exit_status, ...)
{
- gint exit_status = 0;
+ int exit_status = 0;
GError *error = NULL;
char *arg;
va_list va_args;
@@ -1669,7 +1669,7 @@ nmtst_assert_connection_verifies_and_normalizable (NMConnection *con)
static inline void
nmtst_assert_connection_verifies_after_normalization (NMConnection *con,
GQuark expect_error_domain,
- gint expect_error_code)
+ int expect_error_code)
{
/* assert that the connection does not verify, but normalization does fix it */
GError *error = NULL;
@@ -1696,7 +1696,7 @@ nmtst_assert_connection_verifies_after_normalization (NMConnection *con,
static inline void
nmtst_assert_connection_unnormalizable (NMConnection *con,
GQuark expect_error_domain,
- gint expect_error_code)
+ int expect_error_code)
{
/* assert that the connection does not verify, and it cannot be fixed by normalization */
@@ -1794,7 +1794,7 @@ _nmtst_assert_connection_has_settings (NMConnection *connection, gboolean has_at
static inline void
nmtst_assert_setting_verify_fails (NMSetting *setting,
GQuark expect_error_domain,
- gint expect_error_code)
+ int expect_error_code)
{
/* assert that the setting verification fails */
diff --git a/src/devices/bluetooth/nm-bluez-manager.c b/src/devices/bluetooth/nm-bluez-manager.c
index c74ecd8195..711f2e5786 100644
--- a/src/devices/bluetooth/nm-bluez-manager.c
+++ b/src/devices/bluetooth/nm-bluez-manager.c
@@ -244,8 +244,8 @@ setup_bluez5 (NMBluezManager *self)
static void
watch_name_on_appeared (GDBusConnection *connection,
- const gchar *name,
- const gchar *name_owner,
+ const char *name,
+ const char *name_owner,
gpointer user_data)
{
check_bluez_and_try_setup (NM_BLUEZ_MANAGER (user_data));
diff --git a/src/devices/bluetooth/nm-bluez5-manager.c b/src/devices/bluetooth/nm-bluez5-manager.c
index 5d3bd23a9e..e984212bb6 100644
--- a/src/devices/bluetooth/nm-bluez5-manager.c
+++ b/src/devices/bluetooth/nm-bluez5-manager.c
@@ -224,7 +224,7 @@ network_server_unregister_bridge (const NMBtVTableNetworkServer *vtable,
}
static void
-network_server_removed (GDBusProxy *proxy, const gchar *path, NMBluez5Manager *self)
+network_server_removed (GDBusProxy *proxy, const char *path, NMBluez5Manager *self)
{
NetworkServer *network_server;
@@ -241,7 +241,7 @@ network_server_removed (GDBusProxy *proxy, const gchar *path, NMBluez5Manager *s
}
static void
-network_server_added (GDBusProxy *proxy, const gchar *path, const char *addr, NMBluez5Manager *self)
+network_server_added (GDBusProxy *proxy, const char *path, const char *addr, NMBluez5Manager *self)
{
NMBluez5ManagerPrivate *priv = NM_BLUEZ5_MANAGER_GET_PRIVATE (self);
NetworkServer *network_server;
@@ -342,7 +342,7 @@ device_initialized (NMBluezDevice *device, gboolean success, NMBluez5Manager *se
}
static void
-device_added (GDBusProxy *proxy, const gchar *path, NMBluez5Manager *self)
+device_added (GDBusProxy *proxy, const char *path, NMBluez5Manager *self)
{
NMBluez5ManagerPrivate *priv = NM_BLUEZ5_MANAGER_GET_PRIVATE (self);
NMBluezDevice *device;
@@ -356,7 +356,7 @@ device_added (GDBusProxy *proxy, const gchar *path, NMBluez5Manager *self)
}
static void
-device_removed (GDBusProxy *proxy, const gchar *path, NMBluez5Manager *self)
+device_removed (GDBusProxy *proxy, const char *path, NMBluez5Manager *self)
{
NMBluez5ManagerPrivate *priv = NM_BLUEZ5_MANAGER_GET_PRIVATE (self);
NMBluezDevice *device;
diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c
index d646493a5c..aa2a389a5d 100644
--- a/src/devices/nm-device.c
+++ b/src/devices/nm-device.c
@@ -614,7 +614,7 @@ static void _set_state_full (NMDevice *self,
static void queued_state_clear (NMDevice *device);
static gboolean queued_ip4_config_change (gpointer user_data);
static gboolean queued_ip6_config_change (gpointer user_data);
-static void ip_check_ping_watch_cb (GPid pid, gint status, gpointer user_data);
+static void ip_check_ping_watch_cb (GPid pid, int status, gpointer user_data);
static gboolean ip_config_valid (NMDeviceState state);
static NMActStageReturn dhcp4_start (NMDevice *self);
static gboolean dhcp6_start (NMDevice *self, gboolean wait_for_ll);
@@ -1018,7 +1018,7 @@ static void
init_ip_config_dns_priority (NMDevice *self, NMIPConfig *config)
{
gs_free char *value = NULL;
- gint priority;
+ int priority;
value = nm_config_data_get_connection_default (NM_CONFIG_GET_DATA,
(nm_ip_config_get_addr_family (config) == AF_INET)
@@ -6180,7 +6180,7 @@ get_ipv4_dad_timeout (NMDevice *self)
NMConnection *connection;
NMSettingIPConfig *s_ip4 = NULL;
gs_free char *value = NULL;
- gint ret = 0;
+ int ret = 0;
connection = nm_device_get_applied_connection (self);
if (connection)
@@ -11711,11 +11711,11 @@ spawn_ping (NMDevice *self)
gboolean ret;
args[6] = str_timeout = g_strdup_printf ("%u", priv->gw_ping.deadline);
- tmp_str = g_strjoinv (" ", (gchar **) args);
+ tmp_str = g_strjoinv (" ", (char **) args);
_LOGD (priv->gw_ping.log_domain, "ping: running '%s'", tmp_str);
ret = g_spawn_async ("/",
- (gchar **) args,
+ (char **) args,
NULL,
G_SPAWN_DO_NOT_REAP_CHILD,
NULL,
@@ -11751,7 +11751,7 @@ respawn_ping_cb (gpointer user_data)
}
static void
-ip_check_ping_watch_cb (GPid pid, gint status, gpointer user_data)
+ip_check_ping_watch_cb (GPid pid, int status, gpointer user_data)
{
NMDevice *self = NM_DEVICE (user_data);
NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self);
@@ -15182,7 +15182,7 @@ nm_device_get_supplicant_timeout (NMDevice *self)
NMConnection *connection;
NMSetting8021x *s_8021x;
gs_free char *value = NULL;
- gint timeout;
+ int timeout;
#define SUPPLICANT_DEFAULT_TIMEOUT 25
g_return_val_if_fail (NM_IS_DEVICE (self), SUPPLICANT_DEFAULT_TIMEOUT);
diff --git a/src/devices/team/nm-device-team.c b/src/devices/team/nm-device-team.c
index bfca8ec186..ef7c63b8a8 100644
--- a/src/devices/team/nm-device-team.c
+++ b/src/devices/team/nm-device-team.c
@@ -368,8 +368,8 @@ teamd_timeout_cb (gpointer user_data)
static void
teamd_dbus_appeared (GDBusConnection *connection,
- const gchar *name,
- const gchar *name_owner,
+ const char *name,
+ const char *name_owner,
gpointer user_data)
{
NMDeviceTeam *self = NM_DEVICE_TEAM (user_data);
@@ -431,7 +431,7 @@ teamd_dbus_appeared (GDBusConnection *connection,
static void
teamd_dbus_vanished (GDBusConnection *dbus_connection,
- const gchar *name,
+ const char *name,
gpointer user_data)
{
NMDeviceTeam *self = NM_DEVICE_TEAM (user_data);
@@ -464,7 +464,7 @@ teamd_dbus_vanished (GDBusConnection *dbus_connection,
}
static void
-teamd_process_watch_cb (GPid pid, gint status, gpointer user_data)
+teamd_process_watch_cb (GPid pid, int status, gpointer user_data)
{
NMDeviceTeam *self = NM_DEVICE_TEAM (user_data);
NMDeviceTeamPrivate *priv = NM_DEVICE_TEAM_GET_PRIVATE (self);
@@ -517,7 +517,7 @@ teamd_kill (NMDeviceTeam *self, const char *teamd_binary, GError **error)
g_ptr_array_add (argv, (gpointer) nm_device_get_iface (NM_DEVICE (self)));
g_ptr_array_add (argv, NULL);
- _LOGD (LOGD_TEAM, "running: %s", (tmp_str = g_strjoinv (" ", (gchar **) argv->pdata)));
+ _LOGD (LOGD_TEAM, "running: %s", (tmp_str = g_strjoinv (" ", (char **) argv->pdata)));
return g_spawn_sync ("/", (char **) argv->pdata, NULL, 0, teamd_child_setup, NULL, NULL, NULL, NULL, error);
}
@@ -605,7 +605,7 @@ teamd_start (NMDevice *device, NMConnection *connection)
g_ptr_array_add (argv, (gpointer) "-gg");
g_ptr_array_add (argv, NULL);
- _LOGD (LOGD_TEAM, "running: %s", (tmp_str = g_strjoinv (" ", (gchar **) argv->pdata)));
+ _LOGD (LOGD_TEAM, "running: %s", (tmp_str = g_strjoinv (" ", (char **) argv->pdata)));
if (!g_spawn_async ("/", (char **) argv->pdata, NULL, G_SPAWN_DO_NOT_REAP_CHILD,
teamd_child_setup, NULL, &priv->teamd_pid, &error)) {
_LOGW (LOGD_TEAM, "Activation: (team) failed to start teamd: %s", error->message);
diff --git a/src/devices/wifi/nm-device-iwd.c b/src/devices/wifi/nm-device-iwd.c
index 7667816a70..cdb688d9ae 100644
--- a/src/devices/wifi/nm-device-iwd.c
+++ b/src/devices/wifi/nm-device-iwd.c
@@ -204,11 +204,11 @@ remove_all_aps (NMDeviceIwd *self)
}
static GVariant *
-vardict_from_network_type (const gchar *type)
+vardict_from_network_type (const char *type)
{
GVariantBuilder builder;
- const gchar *key_mgmt = "";
- const gchar *pairwise = "ccmp";
+ const char *key_mgmt = "";
+ const char *pairwise = "ccmp";
if (!strcmp (type, "psk"))
key_mgmt = "wpa-psk";
@@ -235,7 +235,7 @@ get_ordered_networks_cb (GObject *source, GAsyncResult *res, gpointer user_data)
gs_free_error GError *error = NULL;
gs_unref_variant GVariant *variant = NULL;
GVariantIter *networks;
- const gchar *path, *name, *type;
+ const char *path, *name, *type;
int16_t signal;
NMWifiAP *ap, *ap_safe, *new_ap;
gboolean changed = FALSE;
@@ -473,7 +473,7 @@ is_connection_known_network (NMConnection *connection)
{
NMSettingWireless *s_wireless;
GBytes *ssid;
- gs_free gchar *str_ssid = NULL;
+ gs_free char *str_ssid = NULL;
s_wireless = nm_connection_get_setting_wireless (connection);
if (!s_wireless)
@@ -1005,11 +1005,11 @@ static gboolean
try_reply_agent_request (NMDeviceIwd *self,
NMConnection *connection,
GDBusMethodInvocation *invocation,
- const gchar **setting_name,
- const gchar **setting_key,
+ const char **setting_name,
+ const char **setting_key,
gboolean *replied)
{
- const gchar *method_name = g_dbus_method_invocation_get_method_name (invocation);
+ const char *method_name = g_dbus_method_invocation_get_method_name (invocation);
NMSettingWirelessSecurity *s_wireless_sec;
NMSetting8021x *s_8021x;
@@ -1019,7 +1019,7 @@ try_reply_agent_request (NMDeviceIwd *self,
*replied = FALSE;
if (!strcmp (method_name, "RequestPassphrase")) {
- const gchar *psk;
+ const char *psk;
if (!s_wireless_sec)
return FALSE;
@@ -1039,7 +1039,7 @@ try_reply_agent_request (NMDeviceIwd *self,
*setting_key = NM_SETTING_WIRELESS_SECURITY_PSK;
return TRUE;
} else if (!strcmp (method_name, "RequestPrivateKeyPassphrase")) {
- const gchar *password;
+ const char *password;
if (!s_8021x)
return FALSE;
@@ -1059,7 +1059,7 @@ try_reply_agent_request (NMDeviceIwd *self,
*setting_key = NM_SETTING_802_1X_PRIVATE_KEY_PASSWORD;
return TRUE;
} else if (!strcmp (method_name, "RequestUserNameAndPassword")) {
- const gchar *identity, *password;
+ const char *identity, *password;
if (!s_8021x)
return FALSE;
@@ -1083,7 +1083,7 @@ try_reply_agent_request (NMDeviceIwd *self,
*setting_key = NM_SETTING_802_1X_PASSWORD;
return TRUE;
} else if (!strcmp (method_name, "RequestUserPassword")) {
- const gchar *password;
+ const char *password;
if (!s_8021x)
return FALSE;
@@ -1124,8 +1124,8 @@ wifi_secrets_cb (NMActRequest *req,
NMDeviceIwdPrivate *priv;
NMDevice *device;
GDBusMethodInvocation *invocation;
- const gchar *setting_name;
- const gchar *setting_key;
+ const char *setting_name;
+ const char *setting_key;
gboolean replied;
NMSecretAgentGetSecretsFlags get_secret_flags = NM_SECRET_AGENT_GET_SECRETS_FLAG_ALLOW_INTERACTION;
@@ -1223,12 +1223,12 @@ network_connect_cb (GObject *source, GAsyncResult *res, gpointer user_data)
NMConnection *connection;
NMSettingWireless *s_wifi;
GBytes *ssid;
- gs_free gchar *str_ssid = NULL;
+ gs_free char *str_ssid = NULL;
if (!_nm_dbus_proxy_call_finish (G_DBUS_PROXY (source), res,
G_VARIANT_TYPE ("()"),
&error)) {
- gs_free gchar *dbus_error = NULL;
+ gs_free char *dbus_error = NULL;
/* Connection failed; radio problems or if the network wasn't
* open, the passwords or certificates may be wrong.
@@ -1667,7 +1667,7 @@ set_property (GObject *object, guint prop_id,
/*****************************************************************************/
static void
-state_changed (NMDeviceIwd *self, const gchar *new_state)
+state_changed (NMDeviceIwd *self, const char *new_state)
{
NMDeviceIwdPrivate *priv = NM_DEVICE_IWD_GET_PRIVATE (self);
NMDevice *device = NM_DEVICE (self);
@@ -1774,7 +1774,7 @@ properties_changed (GDBusProxy *proxy, GVariant *changed_properties,
{
NMDeviceIwd *self = user_data;
GVariantIter *iter;
- const gchar *key;
+ const char *key;
GVariant *value;
g_variant_get (changed_properties, "a{sv}", &iter);
@@ -1852,8 +1852,8 @@ nm_device_iwd_agent_query (NMDeviceIwd *self,
GDBusMethodInvocation *invocation)
{
NMActRequest *req;
- const gchar *setting_name;
- const gchar *setting_key;
+ const char *setting_name;
+ const char *setting_key;
gboolean replied;
NMSecretAgentGetSecretsFlags get_secret_flags = NM_SECRET_AGENT_GET_SECRETS_FLAG_ALLOW_INTERACTION;
diff --git a/src/devices/wifi/nm-device-wifi.c b/src/devices/wifi/nm-device-wifi.c
index b77cf8002e..83f8afb6de 100644
--- a/src/devices/wifi/nm-device-wifi.c
+++ b/src/devices/wifi/nm-device-wifi.c
@@ -1880,7 +1880,7 @@ need_new_8021x_secrets (NMDeviceWifi *self,
static gboolean
need_new_wpa_psk (NMDeviceWifi *self,
NMSupplicantInterfaceState old_state,
- gint disconnect_reason,
+ int disconnect_reason,
const char **setting_name)
{
NMSettingWirelessSecurity *s_wsec;
diff --git a/src/devices/wifi/nm-iwd-manager.c b/src/devices/wifi/nm-iwd-manager.c
index 0f95fa0801..58af7ad306 100644
--- a/src/devices/wifi/nm-iwd-manager.c
+++ b/src/devices/wifi/nm-iwd-manager.c
@@ -34,7 +34,7 @@
/*****************************************************************************/
typedef struct {
- gchar *name;
+ char *name;
NMIwdNetworkSecurity security;
} KnownNetworkData;
@@ -44,7 +44,7 @@ typedef struct {
gboolean running;
GDBusObjectManager *object_manager;
guint agent_id;
- gchar *agent_path;
+ char *agent_path;
GSList *known_networks;
} NMIwdManagerPrivate;
@@ -85,18 +85,18 @@ G_DEFINE_TYPE (NMIwdManager, nm_iwd_manager, G_TYPE_OBJECT)
static void
agent_dbus_method_cb (GDBusConnection *connection,
- const gchar *sender, const gchar *object_path,
- const gchar *interface_name, const gchar *method_name,
+ const char *sender, const char *object_path,
+ const char *interface_name, const char *method_name,
GVariant *parameters,
GDBusMethodInvocation *invocation,
gpointer user_data)
{
NMIwdManager *self = user_data;
NMIwdManagerPrivate *priv = NM_IWD_MANAGER_GET_PRIVATE (self);
- const gchar *network_path, *device_path, *ifname;
+ const char *network_path, *device_path, *ifname;
gs_unref_object GDBusInterface *network = NULL, *device_obj = NULL;
gs_unref_variant GVariant *value = NULL;
- gint ifindex;
+ int ifindex;
NMDevice *device;
gs_free char *name_owner = NULL;
@@ -207,12 +207,12 @@ static const GDBusInterfaceInfo iwd_agent_iface_info = NM_DEFINE_GDBUS_INTERFACE
static guint
iwd_agent_export (GDBusConnection *connection, gpointer user_data,
- gchar **agent_path, GError **error)
+ char **agent_path, GError **error)
{
static const GDBusInterfaceVTable vtable = {
.method_call = agent_dbus_method_cb,
};
- gchar path[50];
+ char path[50];
unsigned int rnd;
guint id;
@@ -259,7 +259,7 @@ set_device_dbus_object (NMIwdManager *self, GDBusInterface *interface,
GDBusProxy *proxy;
GVariant *value;
const char *ifname;
- gint ifindex;
+ int ifindex;
NMDevice *device;
if (!priv->running)
@@ -380,9 +380,9 @@ list_known_networks_cb (GObject *source, GAsyncResult *res, gpointer user_data)
g_variant_get (variant, "(aa{sv})", &networks);
while (g_variant_iter_next (networks, "a{sv}", &props)) {
- const gchar *key;
- const gchar *name = NULL;
- const gchar *type = NULL;
+ const char *key;
+ const char *name = NULL;
+ const char *type = NULL;
GVariant *val;
KnownNetworkData *network_data;
@@ -594,7 +594,7 @@ prepare_object_manager (NMIwdManager *self)
}
gboolean
-nm_iwd_manager_is_known_network (NMIwdManager *self, const gchar *name,
+nm_iwd_manager_is_known_network (NMIwdManager *self, const char *name,
NMIwdNetworkSecurity security)
{
NMIwdManagerPrivate *priv = NM_IWD_MANAGER_GET_PRIVATE (self);
@@ -611,7 +611,7 @@ nm_iwd_manager_is_known_network (NMIwdManager *self, const gchar *name,
}
void
-nm_iwd_manager_network_connected (NMIwdManager *self, const gchar *name,
+nm_iwd_manager_network_connected (NMIwdManager *self, const char *name,
NMIwdNetworkSecurity security)
{
NMIwdManagerPrivate *priv = NM_IWD_MANAGER_GET_PRIVATE (self);
diff --git a/src/devices/wifi/nm-iwd-manager.h b/src/devices/wifi/nm-iwd-manager.h
index 8e6b66ff2d..6e9bff8790 100644
--- a/src/devices/wifi/nm-iwd-manager.h
+++ b/src/devices/wifi/nm-iwd-manager.h
@@ -57,9 +57,9 @@ GType nm_iwd_manager_get_type (void);
NMIwdManager *nm_iwd_manager_get (void);
-gboolean nm_iwd_manager_is_known_network (NMIwdManager *self, const gchar *name,
+gboolean nm_iwd_manager_is_known_network (NMIwdManager *self, const char *name,
NMIwdNetworkSecurity security);
-void nm_iwd_manager_network_connected (NMIwdManager *self, const gchar *name,
+void nm_iwd_manager_network_connected (NMIwdManager *self, const char *name,
NMIwdNetworkSecurity security);
#endif /* __NETWORKMANAGER_IWD_MANAGER_H__ */
diff --git a/src/devices/wifi/nm-wifi-ap.c b/src/devices/wifi/nm-wifi-ap.c
index dd6d1deb6e..d299d10234 100644
--- a/src/devices/wifi/nm-wifi-ap.c
+++ b/src/devices/wifi/nm-wifi-ap.c
@@ -1146,7 +1146,7 @@ get_property (GObject *object, guint prop_id,
case PROP_LAST_SEEN:
g_value_set_int (value,
priv->last_seen > 0
- ? (gint) nm_utils_monotonic_timestamp_as_boottime (priv->last_seen, NM_UTILS_NS_PER_SECOND)
+ ? (int) nm_utils_monotonic_timestamp_as_boottime (priv->last_seen, NM_UTILS_NS_PER_SECOND)
: -1);
break;
default:
diff --git a/src/devices/wifi/nm-wifi-utils.c b/src/devices/wifi/nm-wifi-utils.c
index 044bd392dd..2fe81e323a 100644
--- a/src/devices/wifi/nm-wifi-utils.c
+++ b/src/devices/wifi/nm-wifi-utils.c
@@ -764,7 +764,7 @@ nm_wifi_utils_complete_connection (const GByteArray *ap_ssid,
}
guint32
-nm_wifi_utils_level_to_quality (gint val)
+nm_wifi_utils_level_to_quality (int val)
{
if (val < 0) {
/* Assume dBm already; rough conversion: best = -40, worst = -100 */
diff --git a/src/devices/wifi/nm-wifi-utils.h b/src/devices/wifi/nm-wifi-utils.h
index def64dd6ff..3a982bb99b 100644
--- a/src/devices/wifi/nm-wifi-utils.h
+++ b/src/devices/wifi/nm-wifi-utils.h
@@ -37,7 +37,7 @@ gboolean nm_wifi_utils_complete_connection (const GByteArray *ssid,
gboolean lock_bssid,
GError **error);
-guint32 nm_wifi_utils_level_to_quality (gint val);
+guint32 nm_wifi_utils_level_to_quality (int val);
gboolean nm_wifi_utils_is_manf_default_ssid (const GByteArray *ssid);
diff --git a/src/devices/wifi/tests/test-general.c b/src/devices/wifi/tests/test-general.c
index 89eebb229c..a4507813d3 100644
--- a/src/devices/wifi/tests/test-general.c
+++ b/src/devices/wifi/tests/test-general.c
@@ -127,7 +127,7 @@ set_items (NMSetting *setting, const KeyData *items)
g_assert (item->str == NULL);
g_object_set (G_OBJECT (setting), item->key, item->uint, NULL);
} else if (pspec->value_type == G_TYPE_INT) {
- gint foo = (gint) item->uint;
+ int foo = (int) item->uint;
g_assert (item->str == NULL);
g_object_set (G_OBJECT (setting), item->key, foo, NULL);
@@ -1462,7 +1462,7 @@ main (int argc, char **argv)
test_ap_wpa_eap_connection_5);
#define ADD_FUNC(func) do { \
- gchar *name_idx = g_strdup_printf ("/wifi/wpa_psk/" G_STRINGIFY (func) "/%zd", i); \
+ char *name_idx = g_strdup_printf ("/wifi/wpa_psk/" G_STRINGIFY (func) "/%zd", i); \
g_test_add_data_func (name_idx, (gconstpointer) i, func); \
g_free (name_idx); \
} while (0)
@@ -1487,7 +1487,7 @@ main (int argc, char **argv)
#undef ADD_FUNC
#define ADD_FUNC(func) do { \
- gchar *name_idx = g_strdup_printf ("/wifi/rsn_psk/" G_STRINGIFY (func) "/%zd", i); \
+ char *name_idx = g_strdup_printf ("/wifi/rsn_psk/" G_STRINGIFY (func) "/%zd", i); \
g_test_add_data_func (name_idx, (gconstpointer) i, func); \
g_free (name_idx); \
} while (0)
diff --git a/src/devices/wwan/nm-modem-broadband.c b/src/devices/wwan/nm-modem-broadband.c
index e5678b9635..678c92bf7e 100644
--- a/src/devices/wwan/nm-modem-broadband.c
+++ b/src/devices/wwan/nm-modem-broadband.c
@@ -256,7 +256,7 @@ create_cdma_connect_properties (NMConnection *connection)
{
NMSettingCdma *setting;
MMSimpleConnectProperties *properties;
- const gchar *str;
+ const char *str;
setting = nm_connection_get_setting_cdma (connection);
properties = mm_simple_connect_properties_new ();
@@ -274,7 +274,7 @@ create_gsm_connect_properties (NMConnection *connection)
NMSettingGsm *setting;
NMSettingPpp *s_ppp;
MMSimpleConnectProperties *properties;
- const gchar *str;
+ const char *str;
setting = nm_connection_get_setting_gsm (connection);
properties = mm_simple_connect_properties_new ();
@@ -868,12 +868,12 @@ static_stage3_ip4_done (NMModemBroadband *self)
GError *error = NULL;
gs_unref_object NMIP4Config *config = NULL;
const char *data_port;
- const gchar *address_string;
- const gchar *gw_string;
+ const char *address_string;
+ const char *gw_string;
guint32 address_network;
guint32 gw = 0;
NMPlatformIP4Address address;
- const gchar **dns;
+ const char **dns;
guint i;
guint32 ip4_route_table, ip4_route_metric;
NMPlatformIP4Route *r;
@@ -979,10 +979,10 @@ stage3_ip6_done (NMModemBroadband *self)
GError *error = NULL;
NMIP6Config *config = NULL;
const char *data_port;
- const gchar *address_string;
+ const char *address_string;
NMPlatformIP6Address address;
NMModemIPMethod ip_method;
- const gchar **dns;
+ const char **dns;
guint i;
g_assert (self->_priv.ipv6_config);
diff --git a/src/devices/wwan/nm-modem-manager.c b/src/devices/wwan/nm-modem-manager.c
index 59cd2bca5f..dfc102f3e5 100644
--- a/src/devices/wwan/nm-modem-manager.c
+++ b/src/devices/wwan/nm-modem-manager.c
@@ -170,7 +170,7 @@ modm_handle_object_added (MMManager *modem_manager,
NMModemManager *self)
{
NMModemManagerPrivate *priv = NM_MODEM_MANAGER_GET_PRIVATE (self);
- const gchar *path;
+ const char *path;
MMModem *modem_iface;
NMModem *modem;
GError *error = NULL;
@@ -211,7 +211,7 @@ modm_handle_object_removed (MMManager *manager,
{
NMModemManagerPrivate *priv = NM_MODEM_MANAGER_GET_PRIVATE (self);
NMModem *modem;
- const gchar *path;
+ const char *path;
path = mm_object_get_path (modem_object);
modem = (NMModem *) g_hash_table_lookup (priv->modems, path);
@@ -246,7 +246,7 @@ modm_handle_name_owner_changed (MMManager *modem_manager,
NMModemManager *self)
{
NMModemManagerPrivate *priv = NM_MODEM_MANAGER_GET_PRIVATE (self);
- gchar *name_owner;
+ char *name_owner;
/* Quit poking, if any */
nm_clear_g_source (&priv->modm.relaunch_id);
@@ -341,7 +341,7 @@ static void
modm_manager_check_name_owner (NMModemManager *self)
{
NMModemManagerPrivate *priv = NM_MODEM_MANAGER_GET_PRIVATE (self);
- gs_free gchar *name_owner = NULL;
+ gs_free char *name_owner = NULL;
name_owner = g_dbus_object_manager_client_get_name_owner (G_DBUS_OBJECT_MANAGER_CLIENT (priv->modm.manager));
if (name_owner) {
@@ -606,14 +606,14 @@ ofono_create_modem (NMModemManager *self, const char *path)
static void
ofono_signal_cb (GDBusProxy *proxy,
- gchar *sender_name,
- gchar *signal_name,
+ char *sender_name,
+ char *signal_name,
GVariant *parameters,
gpointer user_data)
{
NMModemManager *self = NM_MODEM_MANAGER (user_data);
NMModemManagerPrivate *priv = NM_MODEM_MANAGER_GET_PRIVATE (self);
- gchar *object_path;
+ char *object_path;
NMModem *modem;
if (g_strcmp0 (signal_name, "ModemAdded") == 0) {
diff --git a/src/devices/wwan/nm-modem-ofono.c b/src/devices/wwan/nm-modem-ofono.c
index 8b81ac4143..1ced1335e8 100644
--- a/src/devices/wwan/nm-modem-ofono.c
+++ b/src/devices/wwan/nm-modem-ofono.c
@@ -830,8 +830,8 @@ context_property_changed (GDBusProxy *proxy,
gboolean ret = FALSE;
gs_unref_variant GVariant *v_dict = NULL;
const char *interface;
- const gchar *s;
- const gchar **array, **iter;
+ const char *s;
+ const char **array, **iter;
guint32 address_network, gateway_network;
guint32 ip4_route_table, ip4_route_metric;
int ifindex;
diff --git a/src/devices/wwan/nm-modem.c b/src/devices/wwan/nm-modem.c
index 617d5c4a54..62e95cc795 100644
--- a/src/devices/wwan/nm-modem.c
+++ b/src/devices/wwan/nm-modem.c
@@ -291,7 +291,7 @@ nm_modem_get_supported_ip_types (NMModem *self)
return NM_MODEM_GET_PRIVATE (self)->ip_types;
}
-const gchar *
+const char *
nm_modem_ip_type_to_string (NMModemIPType ip_type)
{
switch (ip_type) {
diff --git a/src/devices/wwan/nm-modem.h b/src/devices/wwan/nm-modem.h
index cad9ece415..1f05d07dae 100644
--- a/src/devices/wwan/nm-modem.h
+++ b/src/devices/wwan/nm-modem.h
@@ -273,7 +273,7 @@ void nm_modem_emit_ip6_config_result (NMModem *self,
NMIP6Config *config,
GError *error);
-const gchar *nm_modem_ip_type_to_string (NMModemIPType ip_type);
+const char *nm_modem_ip_type_to_string (NMModemIPType ip_type);
guint32 nm_modem_get_configured_mtu (NMDevice *self, NMDeviceMtuSource *out_source);
diff --git a/src/dhcp/nm-dhcp-client.c b/src/dhcp/nm-dhcp-client.c
index 360bd36767..2e7db09eb1 100644
--- a/src/dhcp/nm-dhcp-client.c
+++ b/src/dhcp/nm-dhcp-client.c
@@ -423,7 +423,7 @@ transaction_timeout (gpointer user_data)
}
static void
-daemon_watch_cb (GPid pid, gint status, gpointer user_data)
+daemon_watch_cb (GPid pid, int status, gpointer user_data)
{
NMDhcpClient *self = NM_DHCP_CLIENT (user_data);
NMDhcpClientPrivate *priv = NM_DHCP_CLIENT_GET_PRIVATE (self);
@@ -712,7 +712,7 @@ maybe_add_option (NMDhcpClient *self,
gboolean
nm_dhcp_client_handle_event (gpointer unused,
const char *iface,
- gint pid,
+ int pid,
GVariant *options,
const char *reason,
NMDhcpClient *self)
diff --git a/src/dhcp/nm-dhcp-client.h b/src/dhcp/nm-dhcp-client.h
index f3d0b7d184..ac959a1d8a 100644
--- a/src/dhcp/nm-dhcp-client.h
+++ b/src/dhcp/nm-dhcp-client.h
@@ -176,7 +176,7 @@ void nm_dhcp_client_set_state (NMDhcpClient *self,
gboolean nm_dhcp_client_handle_event (gpointer unused,
const char *iface,
- gint pid,
+ int pid,
GVariant *options,
const char *reason,
NMDhcpClient *self);
diff --git a/src/dhcp/nm-dhcp-dhclient.c b/src/dhcp/nm-dhcp-dhclient.c
index 3bd14ebe89..8408e3f902 100644
--- a/src/dhcp/nm-dhcp-dhclient.c
+++ b/src/dhcp/nm-dhcp-dhclient.c
@@ -447,7 +447,7 @@ dhclient_start (NMDhcpClient *client,
g_ptr_array_add (argv, NULL);
_LOGD ("running: %s",
- (cmd_str = g_strjoinv (" ", (gchar **) argv->pdata)));
+ (cmd_str = g_strjoinv (" ", (char **) argv->pdata)));
if (!g_spawn_async (NULL, (char **) argv->pdata, NULL,
G_SPAWN_DO_NOT_REAP_CHILD | G_SPAWN_STDOUT_TO_DEV_NULL | G_SPAWN_STDERR_TO_DEV_NULL,
diff --git a/src/dhcp/nm-dhcp-dhcpcanon.c b/src/dhcp/nm-dhcp-dhcpcanon.c
index 12aa57aa50..92aa7f8ca3 100644
--- a/src/dhcp/nm-dhcp-dhcpcanon.c
+++ b/src/dhcp/nm-dhcp-dhcpcanon.c
@@ -144,7 +144,7 @@ dhcpcanon_start (NMDhcpClient *client,
g_ptr_array_add (argv, (gpointer) iface);
g_ptr_array_add (argv, NULL);
- cmd_str = g_strjoinv (" ", (gchar **) argv->pdata);
+ cmd_str = g_strjoinv (" ", (char **) argv->pdata);
g_free (cmd_str);
if (g_spawn_async (NULL, (char **) argv->pdata, NULL,
diff --git a/src/dhcp/nm-dhcp-dhcpcd.c b/src/dhcp/nm-dhcp-dhcpcd.c
index c4bcb08437..10094e5c2f 100644
--- a/src/dhcp/nm-dhcp-dhcpcd.c
+++ b/src/dhcp/nm-dhcp-dhcpcd.c
@@ -153,7 +153,7 @@ ip4_start (NMDhcpClient *client, const char *dhcp_anycast_addr, const char *last
g_ptr_array_add (argv, (gpointer) iface);
g_ptr_array_add (argv, NULL);
- cmd_str = g_strjoinv (" ", (gchar **) argv->pdata);
+ cmd_str = g_strjoinv (" ", (char **) argv->pdata);
_LOGD ("running: %s", cmd_str);
g_free (cmd_str);
diff --git a/src/dhcp/nm-dhcp-utils.c b/src/dhcp/nm-dhcp-utils.c
index 9185a135a2..6bbc670b28 100644
--- a/src/dhcp/nm-dhcp-utils.c
+++ b/src/dhcp/nm-dhcp-utils.c
@@ -594,7 +594,7 @@ ip6_add_domain_search (gpointer data, gpointer user_data)
NMPlatformIP6Address
nm_dhcp_utils_ip6_prefix_from_options (GHashTable *options)
{
- gs_strfreev gchar **split_addr = NULL;
+ gs_strfreev char **split_addr = NULL;
NMPlatformIP6Address address = { 0, };
struct in6_addr tmp_addr;
char *str = NULL;
diff --git a/src/dns/nm-dns-dnsmasq.c b/src/dns/nm-dns-dnsmasq.c
index b5b93280d7..90a08d599a 100644
--- a/src/dns/nm-dns-dnsmasq.c
+++ b/src/dns/nm-dns-dnsmasq.c
@@ -407,7 +407,7 @@ update (NMDnsPlugin *plugin,
/*****************************************************************************/
static void
-child_quit (NMDnsPlugin *plugin, gint status)
+child_quit (NMDnsPlugin *plugin, int status)
{
NMDnsDnsmasq *self = NM_DNS_DNSMASQ (plugin);
NMDnsDnsmasqPrivate *priv = NM_DNS_DNSMASQ_GET_PRIVATE (self);
diff --git a/src/dns/nm-dns-manager.c b/src/dns/nm-dns-manager.c
index a29fd81f4e..2a15bf5e46 100644
--- a/src/dns/nm-dns-manager.c
+++ b/src/dns/nm-dns-manager.c
@@ -310,7 +310,7 @@ _config_data_free (NMDnsConfigData *data)
g_slice_free (NMDnsConfigData, data);
}
-static gint
+static int
_ip_config_data_cmp (const NMDnsIPConfigData *a, const NMDnsIPConfigData *b)
{
int a_prio, b_prio;
@@ -333,7 +333,7 @@ _ip_config_data_cmp (const NMDnsIPConfigData *a, const NMDnsIPConfigData *b)
return 0;
}
-static gint
+static int
_ip_config_lst_cmp (const CList *a,
const CList *b,
const void *user_data)
@@ -482,7 +482,7 @@ merge_one_ip_config (NMResolvConfData *rc,
}
static GPid
-run_netconfig (NMDnsManager *self, GError **error, gint *stdin_fd)
+run_netconfig (NMDnsManager *self, GError **error, int *stdin_fd)
{
char *argv[5];
gs_free char *tmp = NULL;
@@ -533,7 +533,7 @@ dispatch_netconfig (NMDnsManager *self,
GError **error)
{
GPid pid;
- gint fd;
+ int fd;
int status;
gssize l;
nm_auto_free_gstring GString *str = NULL;
diff --git a/src/dns/nm-dns-plugin.c b/src/dns/nm-dns-plugin.c
index d9400e3e97..48f04b004d 100644
--- a/src/dns/nm-dns-plugin.c
+++ b/src/dns/nm-dns-plugin.c
@@ -124,7 +124,7 @@ _clear_pidfile (NMDnsPlugin *self)
static void
kill_existing (const char *progname, const char *pidfile, const char *kill_match)
{
- glong pid;
+ long pid;
gs_free char *contents = NULL;
gs_free char *cmdline_contents = NULL;
guint64 start_time;
@@ -167,7 +167,7 @@ out:
}
static void
-watch_cb (GPid pid, gint status, gpointer user_data)
+watch_cb (GPid pid, int status, gpointer user_data)
{
NMDnsPlugin *self = NM_DNS_PLUGIN (user_data);
NMDnsPluginPrivate *priv = NM_DNS_PLUGIN_GET_PRIVATE (self);
diff --git a/src/dns/nm-dns-plugin.h b/src/dns/nm-dns-plugin.h
index 80b77d95c6..8a55921d22 100644
--- a/src/dns/nm-dns-plugin.h
+++ b/src/dns/nm-dns-plugin.h
@@ -70,7 +70,7 @@ typedef struct {
* by NMDnsManager. If the subclass decides the exit status (as returned
* by waitpid(2)) is fatal it should then emit the 'failed' signal.
*/
- void (*child_quit) (NMDnsPlugin *self, gint status);
+ void (*child_quit) (NMDnsPlugin *self, int status);
} NMDnsPluginClass;
GType nm_dns_plugin_get_type (void);
diff --git a/src/dnsmasq/nm-dnsmasq-manager.c b/src/dnsmasq/nm-dnsmasq-manager.c
index 33848c20d7..098894415c 100644
--- a/src/dnsmasq/nm-dnsmasq-manager.c
+++ b/src/dnsmasq/nm-dnsmasq-manager.c
@@ -104,7 +104,7 @@ nm_cmd_line_to_str (NMCmdLine *cmd)
char *str;
g_ptr_array_add (cmd->array, NULL);
- str = g_strjoinv (" ", (gchar **) cmd->array->pdata);
+ str = g_strjoinv (" ", (char **) cmd->array->pdata);
g_ptr_array_remove_index (cmd->array, cmd->array->len - 1);
return str;
@@ -119,7 +119,7 @@ nm_cmd_line_add_string (NMCmdLine *cmd, const char *str)
/*****************************************************************************/
static void
-dm_watch_cb (GPid pid, gint status, gpointer user_data)
+dm_watch_cb (GPid pid, int status, gpointer user_data)
{
NMDnsMasqManager *manager = NM_DNSMASQ_MANAGER (user_data);
NMDnsMasqManagerPrivate *priv = NM_DNSMASQ_MANAGER_GET_PRIVATE (manager);
diff --git a/src/main-utils.c b/src/main-utils.c
index 0f79053607..a597ede7c6 100644
--- a/src/main-utils.c
+++ b/src/main-utils.c
@@ -177,7 +177,7 @@ nm_main_utils_ensure_not_running_pidfile (const char *pidfile)
gs_free char *contents = NULL;
gs_free char *proc_cmdline = NULL;
gsize len = 0;
- glong pid;
+ long pid;
const char *process_name;
const char *prgname = g_get_prgname ();
diff --git a/src/nm-auth-subject.c b/src/nm-auth-subject.c
index 117a3815b1..9ed65e2dd2 100644
--- a/src/nm-auth-subject.c
+++ b/src/nm-auth-subject.c
@@ -200,7 +200,7 @@ _new_unix_process (GDBusMethodInvocation *context,
return NULL;
g_return_val_if_fail (dbus_sender && *dbus_sender, NULL);
- /* polkit glib library stores uid and pid as gint. There might be some
+ /* polkit glib library stores uid and pid as int. There might be some
* pitfalls if the id ever happens to be larger then that. Just assert against
* it here. */
g_return_val_if_fail (uid <= MIN (G_MAXINT, G_MAXINT32), NULL);
@@ -356,7 +356,7 @@ constructed (GObject *object)
return;
case NM_AUTH_SUBJECT_TYPE_UNIX_PROCESS:
/* Ensure pid and uid to be representable as int32.
- * DBUS treats them as uint32, polkit library as gint. */
+ * DBUS treats them as uint32, polkit library as int. */
if (priv->unix_process.pid > MIN (G_MAXINT, G_MAXINT32))
break;
if (priv->unix_process.uid > MIN (G_MAXINT, G_MAXINT32)) {
diff --git a/src/nm-config-data.c b/src/nm-config-data.c
index 813ef9c8a6..f0ec8a882e 100644
--- a/src/nm-config-data.c
+++ b/src/nm-config-data.c
@@ -183,11 +183,11 @@ nm_config_data_has_value (const NMConfigData *self, const char *group, const cha
return !!value;
}
-gint
-nm_config_data_get_value_boolean (const NMConfigData *self, const char *group, const char *key, gint default_value)
+int
+nm_config_data_get_value_boolean (const NMConfigData *self, const char *group, const char *key, int default_value)
{
char *str;
- gint value = default_value;
+ int value = default_value;
g_return_val_if_fail (NM_IS_CONFIG_DATA (self), default_value);
g_return_val_if_fail (group && *group, default_value);
@@ -1335,8 +1335,8 @@ gboolean
nm_config_data_get_device_config_boolean (const NMConfigData *self,
const char *property,
NMDevice *device,
- gint val_no_match,
- gint val_invalid)
+ int val_no_match,
+ int val_invalid)
{
gs_free char *value = NULL;
gboolean has_match;
diff --git a/src/nm-config-data.h b/src/nm-config-data.h
index 650fbe1480..43da96fdc8 100644
--- a/src/nm-config-data.h
+++ b/src/nm-config-data.h
@@ -154,7 +154,7 @@ const char *nm_config_data_get_config_description (const NMConfigData *config_da
gboolean nm_config_data_has_group (const NMConfigData *self, const char *group);
gboolean nm_config_data_has_value (const NMConfigData *self, const char *group, const char *key, NMConfigGetValueFlags flags);
char *nm_config_data_get_value (const NMConfigData *config_data, const char *group, const char *key, NMConfigGetValueFlags flags);
-gint nm_config_data_get_value_boolean (const NMConfigData *self, const char *group, const char *key, gint default_value);
+int nm_config_data_get_value_boolean (const NMConfigData *self, const char *group, const char *key, int default_value);
gint64 nm_config_data_get_value_int64 (const NMConfigData *self, const char *group, const char *key, guint base, gint64 min, gint64 max, gint64 fallback);
char **nm_config_data_get_plugins (const NMConfigData *config_data, gboolean allow_default);
@@ -195,8 +195,8 @@ char *nm_config_data_get_device_config_by_pllink (const NMConfigData *self,
gboolean nm_config_data_get_device_config_boolean (const NMConfigData *self,
const char *property,
NMDevice *device,
- gint val_no_match,
- gint val_invalid);
+ int val_no_match,
+ int val_invalid);
char **nm_config_data_get_groups (const NMConfigData *self);
char **nm_config_data_get_keys (const NMConfigData *self, const char *group);
diff --git a/src/nm-config.c b/src/nm-config.c
index d4682ed6da..102070e951 100644
--- a/src/nm-config.c
+++ b/src/nm-config.c
@@ -167,18 +167,18 @@ static void _set_config_data (NMConfig *self, NMConfigData *new_data, NMConfigCh
/*****************************************************************************/
-gint
+int
nm_config_parse_boolean (const char *str,
- gint default_value)
+ int default_value)
{
return _nm_utils_ascii_str_to_bool (str, default_value);
}
-gint
+int
nm_config_keyfile_get_boolean (const GKeyFile *keyfile,
const char *section,
const char *key,
- gint default_value)
+ int default_value)
{
gs_free char *str = NULL;
@@ -1690,7 +1690,7 @@ nm_config_set_values (NMConfig *self,
GError *local = NULL;
NMConfigData *new_data = NULL;
gs_strfreev char **groups = NULL;
- gint g;
+ int g;
g_return_if_fail (NM_IS_CONFIG (self));
@@ -1948,7 +1948,7 @@ _config_device_state_data_new (int ifindex, GKeyFile *kf)
gs_free char *perm_hw_addr_fake = NULL;
gsize connection_uuid_len;
gsize perm_hw_addr_fake_len;
- gint nm_owned = -1;
+ int nm_owned = -1;
char *p;
guint32 route_metric_default_effective;
guint32 route_metric_default_aspired;
@@ -2126,7 +2126,7 @@ nm_config_device_state_write (int ifindex,
NMConfigDeviceStateManagedType managed,
const char *perm_hw_addr_fake,
const char *connection_uuid,
- gint nm_owned,
+ int nm_owned,
guint32 route_metric_default_aspired,
guint32 route_metric_default_effective)
{
diff --git a/src/nm-config.h b/src/nm-config.h
index 5d027ce06e..1b013ff398 100644
--- a/src/nm-config.h
+++ b/src/nm-config.h
@@ -159,13 +159,13 @@ void _nm_config_state_set (NMConfig *config,
#define nm_config_state_set(config, allow_persist, force_persist, ...) \
_nm_config_state_set (config, allow_persist, force_persist, ##__VA_ARGS__, 0)
-gint nm_config_parse_boolean (const char *str, gint default_value);
+int nm_config_parse_boolean (const char *str, int default_value);
GKeyFile *nm_config_create_keyfile (void);
-gint nm_config_keyfile_get_boolean (const GKeyFile *keyfile,
+int nm_config_keyfile_get_boolean (const GKeyFile *keyfile,
const char *section,
const char *key,
- gint default_value);
+ int default_value);
gint64 nm_config_keyfile_get_int64 (const GKeyFile *keyfile,
const char *section,
const char *key,
@@ -234,7 +234,7 @@ gboolean nm_config_device_state_write (int ifindex,
NMConfigDeviceStateManagedType managed,
const char *perm_hw_addr_fake,
const char *connection_uuid,
- gint nm_owned,
+ int nm_owned,
guint32 route_metric_default_aspired,
guint32 route_metric_default_effective);
diff --git a/src/nm-connectivity.c b/src/nm-connectivity.c
index 389e72ad7c..c484ce1f2f 100644
--- a/src/nm-connectivity.c
+++ b/src/nm-connectivity.c
@@ -240,7 +240,7 @@ curl_check_connectivity (CURLM *mhandle, int sockfd, int ev_bitmask)
NMConnectivityCheckHandle *cb_data;
CURLMsg *msg;
CURLcode eret;
- gint m_left;
+ int m_left;
long response_code;
CURLMcode ret;
int running_handles;
diff --git a/src/nm-core-utils.c b/src/nm-core-utils.c
index a659fea564..51caf8bdfc 100644
--- a/src/nm-core-utils.c
+++ b/src/nm-core-utils.c
@@ -523,7 +523,7 @@ _kc_waited_to_string (char *buf, gint64 wait_start_us)
}
static void
-_kc_cb_watch_child (GPid pid, gint status, gpointer user_data)
+_kc_cb_watch_child (GPid pid, int status, gpointer user_data)
{
KillChildAsyncData *data = user_data;
char buf_exit[KC_EXIT_TO_STRING_BUF_SIZE], buf_wait[KC_WAITED_TO_STRING];
@@ -1446,7 +1446,7 @@ match_config_eval (const char *str, const char *tag, guint cur_nm_version)
{
gs_free char *s_ver = NULL;
gs_strfreev char **s_ver_tokens = NULL;
- gint v_maj = -1, v_min = -1, v_mic = -1;
+ int v_maj = -1, v_min = -1, v_mic = -1;
guint c_maj = -1, c_min = -1, c_mic = -1;
guint n_tokens;
@@ -1578,9 +1578,9 @@ nm_match_spec_split (const char *value)
/* Copied from glibs g_key_file_parse_value_as_string() function
* and adjusted. */
- string_value = g_new (gchar, strlen (value) + 1);
+ string_value = g_new (char, strlen (value) + 1);
- p = (gchar *) value;
+ p = (char *) value;
/* skip over leading whitespace */
while (g_ascii_isspace (*p))
@@ -2027,7 +2027,7 @@ typedef struct
NMSettingDiffResult diff_result;
} LogConnectionSettingItem;
-static gint
+static int
_log_connection_sort_hashes_fcn (gconstpointer a, gconstpointer b)
{
const LogConnectionSettingData *v1 = a;
@@ -2070,7 +2070,7 @@ _log_connection_sort_hashes (NMConnection *connection, NMConnection *diff_base,
return sorted_hashes;
}
-static gint
+static int
_log_connection_sort_names_fcn (gconstpointer a, gconstpointer b)
{
const LogConnectionSettingItem *v1 = a;
@@ -2699,7 +2699,7 @@ nm_utils_fd_get_contents (int fd,
}
if (n_alloc == 0)
- str = g_new0 (gchar, 1);
+ str = g_new0 (char, 1);
else {
str[n_have] = '\0';
if (n_have + 1 < n_alloc) {
@@ -3656,8 +3656,8 @@ nm_utils_g_value_set_strv (GValue *value, GPtrArray *strings)
/*****************************************************************************/
static gboolean
-debug_key_matches (const gchar *key,
- const gchar *token,
+debug_key_matches (const char *key,
+ const char *token,
guint length)
{
/* may not call GLib functions: see note in g_parse_debug_string() */
@@ -3964,8 +3964,8 @@ nm_utils_get_reverse_dns_domains_ip6 (const struct in6_addr *ip, guint8 plen, GP
* specifying a mode for the new file.
*/
gboolean
-nm_utils_file_set_contents (const gchar *filename,
- const gchar *contents,
+nm_utils_file_set_contents (const char *filename,
+ const char *contents,
gssize length,
mode_t mode,
GError **error)
@@ -4068,7 +4068,7 @@ struct plugin_info {
struct stat st;
};
-static gint
+static int
read_device_factory_paths_sort_fcn (gconstpointer a, gconstpointer b)
{
const struct plugin_info *da = a;
diff --git a/src/nm-core-utils.h b/src/nm-core-utils.h
index 38a0fff541..fe429a72e9 100644
--- a/src/nm-core-utils.h
+++ b/src/nm-core-utils.h
@@ -274,8 +274,8 @@ int nm_utils_file_get_contents (int dirfd,
gsize *length,
GError **error);
-gboolean nm_utils_file_set_contents (const gchar *filename,
- const gchar *contents,
+gboolean nm_utils_file_set_contents (const char *filename,
+ const char *contents,
gssize length,
mode_t mode,
GError **error);
diff --git a/src/nm-dcb.c b/src/nm-dcb.c
index 140e7c3649..5a46fa00c9 100644
--- a/src/nm-dcb.c
+++ b/src/nm-dcb.c
@@ -104,7 +104,7 @@ G_STMT_START { \
#define SET_APP(f, s, tag) \
G_STMT_START { \
- gint prio = nm_setting_dcb_get_app_##tag##_priority (s); \
+ int prio = nm_setting_dcb_get_app_##tag##_priority (s); \
\
SET_FLAGS (f, "app:" #tag); \
if ((f & NM_SETTING_DCB_FLAG_ENABLE) && (prio >= 0)) { \
diff --git a/src/nm-hostname-manager.c b/src/nm-hostname-manager.c
index f569ab86cc..fa6434c7f3 100644
--- a/src/nm-hostname-manager.c
+++ b/src/nm-hostname-manager.c
@@ -103,7 +103,7 @@ NM_DEFINE_SINGLETON_GETTER (NMHostnameManager, nm_hostname_manager_get, NM_TYPE_
/*****************************************************************************/
#if defined(HOSTNAME_PERSIST_GENTOO)
-static gchar *
+static char *
read_hostname_gentoo (const char *path)
{
gs_free char *contents = NULL;
@@ -129,7 +129,7 @@ read_hostname_gentoo (const char *path)
#endif
#if defined(HOSTNAME_PERSIST_SLACKWARE)
-static gchar *
+static char *
read_hostname_slackware (const char *path)
{
gs_free char *contents = NULL;
diff --git a/src/nm-ip4-config.c b/src/nm-ip4-config.c
index 6ae81b5730..7cb21a7d07 100644
--- a/src/nm-ip4-config.c
+++ b/src/nm-ip4-config.c
@@ -291,7 +291,7 @@ typedef struct {
guint32 mtu;
int ifindex;
NMIPConfigSource mtu_source;
- gint dns_priority;
+ int dns_priority;
NMSettingConnectionMdns mdns;
GArray *nameservers;
GPtrArray *domains;
@@ -527,7 +527,7 @@ _notify_routes (NMIP4Config *self)
/*****************************************************************************/
-static gint
+static int
_addresses_sort_cmp_get_prio (in_addr_t addr)
{
if (nm_utils_ip4_address_is_link_local (addr))
@@ -538,7 +538,7 @@ _addresses_sort_cmp_get_prio (in_addr_t addr)
static int
_addresses_sort_cmp (gconstpointer a, gconstpointer b, gpointer user_data)
{
- gint p1, p2;
+ int p1, p2;
const NMPlatformIP4Address *a1 = NMP_OBJECT_CAST_IP4_ADDRESS (*((const NMPObject **) a));
const NMPlatformIP4Address *a2 = NMP_OBJECT_CAST_IP4_ADDRESS (*((const NMPObject **) b));
guint32 n1, n2;
@@ -1336,7 +1336,7 @@ nm_ip4_config_subtract (NMIP4Config *dst,
{
NMIP4ConfigPrivate *dst_priv;
guint i;
- gint idx;
+ int idx;
const NMPlatformIP4Address *a;
const NMPlatformIP4Route *r;
NMDedupMultiIter ipconf_iter;
@@ -2529,7 +2529,7 @@ nm_ip4_config_mdns_set (NMIP4Config *self,
/*****************************************************************************/
void
-nm_ip4_config_set_dns_priority (NMIP4Config *self, gint priority)
+nm_ip4_config_set_dns_priority (NMIP4Config *self, int priority)
{
NMIP4ConfigPrivate *priv = NM_IP4_CONFIG_GET_PRIVATE (self);
@@ -2539,7 +2539,7 @@ nm_ip4_config_set_dns_priority (NMIP4Config *self, gint priority)
}
}
-gint
+int
nm_ip4_config_get_dns_priority (const NMIP4Config *self)
{
const NMIP4ConfigPrivate *priv = NM_IP4_CONFIG_GET_PRIVATE (self);
diff --git a/src/nm-ip4-config.h b/src/nm-ip4-config.h
index 78aca14e43..2d45a13da7 100644
--- a/src/nm-ip4-config.h
+++ b/src/nm-ip4-config.h
@@ -256,8 +256,8 @@ void nm_ip4_config_del_dns_option (NMIP4Config *self, guint i);
guint nm_ip4_config_get_num_dns_options (const NMIP4Config *self);
const char * nm_ip4_config_get_dns_option (const NMIP4Config *self, guint i);
-void nm_ip4_config_set_dns_priority (NMIP4Config *self, gint priority);
-gint nm_ip4_config_get_dns_priority (const NMIP4Config *self);
+void nm_ip4_config_set_dns_priority (NMIP4Config *self, int priority);
+int nm_ip4_config_get_dns_priority (const NMIP4Config *self);
void nm_ip4_config_reset_nis_servers (NMIP4Config *self);
void nm_ip4_config_add_nis_server (NMIP4Config *self, guint32 nis);
@@ -430,7 +430,7 @@ nm_ip_config_get_dns_priority (const NMIPConfig *self)
}
static inline void
-nm_ip_config_set_dns_priority (NMIPConfig *self, gint priority)
+nm_ip_config_set_dns_priority (NMIPConfig *self, int priority)
{
_NM_IP_CONFIG_DISPATCH_VOID (self, nm_ip4_config_set_dns_priority, nm_ip6_config_set_dns_priority, priority);
}
diff --git a/src/nm-ip6-config.c b/src/nm-ip6-config.c
index 9807d3882c..f0769c1527 100644
--- a/src/nm-ip6-config.c
+++ b/src/nm-ip6-config.c
@@ -226,7 +226,7 @@ _notify_routes (NMIP6Config *self)
/*****************************************************************************/
-static gint
+static int
_addresses_sort_cmp_get_prio (const struct in6_addr *addr)
{
if (IN6_IS_ADDR_V4MAPPED (addr))
@@ -249,7 +249,7 @@ _addresses_sort_cmp (const NMPlatformIP6Address *a1,
const NMPlatformIP6Address *a2,
gboolean prefer_temp)
{
- gint p1, p2, c;
+ int p1, p2, c;
gboolean perm1, perm2, tent1, tent2;
gboolean ipv6_privacy1, ipv6_privacy2;
@@ -948,7 +948,7 @@ nm_ip6_config_subtract (NMIP6Config *dst,
{
NMIP6ConfigPrivate *dst_priv;
guint i;
- gint idx;
+ int idx;
const NMPlatformIP6Address *a;
const NMPlatformIP6Route *r;
NMDedupMultiIter ipconf_iter;
@@ -2258,7 +2258,7 @@ nm_ip6_config_get_dns_option (const NMIP6Config *self, guint i)
/*****************************************************************************/
void
-nm_ip6_config_set_dns_priority (NMIP6Config *self, gint priority)
+nm_ip6_config_set_dns_priority (NMIP6Config *self, int priority)
{
NMIP6ConfigPrivate *priv = NM_IP6_CONFIG_GET_PRIVATE (self);
@@ -2268,7 +2268,7 @@ nm_ip6_config_set_dns_priority (NMIP6Config *self, gint priority)
}
}
-gint
+int
nm_ip6_config_get_dns_priority (const NMIP6Config *self)
{
const NMIP6ConfigPrivate *priv = NM_IP6_CONFIG_GET_PRIVATE (self);
diff --git a/src/nm-ip6-config.h b/src/nm-ip6-config.h
index 9762ef48be..cb5a209e9c 100644
--- a/src/nm-ip6-config.h
+++ b/src/nm-ip6-config.h
@@ -194,8 +194,8 @@ void nm_ip6_config_del_dns_option (NMIP6Config *self, guint i);
guint nm_ip6_config_get_num_dns_options (const NMIP6Config *self);
const char * nm_ip6_config_get_dns_option (const NMIP6Config *self, guint i);
-void nm_ip6_config_set_dns_priority (NMIP6Config *self, gint priority);
-gint nm_ip6_config_get_dns_priority (const NMIP6Config *self);
+void nm_ip6_config_set_dns_priority (NMIP6Config *self, int priority);
+int nm_ip6_config_get_dns_priority (const NMIP6Config *self);
const NMPObject *nm_ip6_config_nmpobj_lookup (const NMIP6Config *self,
const NMPObject *needle);
diff --git a/src/nm-logging.c b/src/nm-logging.c
index c55537910a..9e7d389224 100644
--- a/src/nm-logging.c
+++ b/src/nm-logging.c
@@ -54,9 +54,9 @@
void (*_nm_logging_clear_platform_logging_cache) (void);
static void
-nm_log_handler (const gchar *log_domain,
+nm_log_handler (const char *log_domain,
GLogLevelFlags level,
- const gchar *message,
+ const char *message,
gpointer ignored);
typedef struct {
@@ -745,9 +745,9 @@ _nm_log_impl (const char *file,
/*****************************************************************************/
static void
-nm_log_handler (const gchar *log_domain,
+nm_log_handler (const char *log_domain,
GLogLevelFlags level,
- const gchar *message,
+ const char *message,
gpointer ignored)
{
int syslog_priority;
diff --git a/src/nm-manager.c b/src/nm-manager.c
index cf2313e097..37d789a0ad 100644
--- a/src/nm-manager.c
+++ b/src/nm-manager.c
@@ -1244,7 +1244,7 @@ find_device_by_permanent_hw_addr (NMManager *self, const char *hwaddr)
}
static NMDevice *
-find_device_by_ip_iface (NMManager *self, const gchar *iface)
+find_device_by_ip_iface (NMManager *self, const char *iface)
{
NMManagerPrivate *priv = NM_MANAGER_GET_PRIVATE (self);
NMDevice *device;
@@ -3827,7 +3827,7 @@ out:
return FALSE;
}
-static gint
+static int
compare_slaves (gconstpointer a, gconstpointer b, gpointer sort_by_name)
{
const SlaveConnectionInfo *a_info = a;
@@ -5884,7 +5884,7 @@ nm_manager_write_device_state (NMManager *self)
NMManagerPrivate *priv = NM_MANAGER_GET_PRIVATE (self);
NMDevice *device;
gs_unref_hashtable GHashTable *seen_ifindexes = NULL;
- gint nm_owned;
+ int nm_owned;
seen_ifindexes = g_hash_table_new (nm_direct_hash, NULL);
diff --git a/src/nm-rfkill-manager.c b/src/nm-rfkill-manager.c
index b2909e9d3e..a7bc694a5a 100644
--- a/src/nm-rfkill-manager.c
+++ b/src/nm-rfkill-manager.c
@@ -65,7 +65,7 @@ typedef struct {
char *path;
char *driver;
RfKillType rtype;
- gint state;
+ int state;
gboolean platform;
} Killswitch;
@@ -158,7 +158,7 @@ killswitch_destroy (Killswitch *ks)
}
static RfKillState
-sysfs_state_to_nm_state (gint sysfs_state)
+sysfs_state_to_nm_state (int sysfs_state)
{
switch (sysfs_state) {
case 0:
diff --git a/src/nm-sleep-monitor.c b/src/nm-sleep-monitor.c
index a7e3a7c394..54d757730f 100644
--- a/src/nm-sleep-monitor.c
+++ b/src/nm-sleep-monitor.c
@@ -84,7 +84,7 @@ struct _NMSleepMonitor {
/* used both during construction of proxy and during Inhibit call. */
GCancellable *cancellable;
- gint inhibit_fd;
+ int inhibit_fd;
GSList *handles_active;
GSList *handles_stale;
diff --git a/src/platform/nm-linux-platform.c b/src/platform/nm-linux-platform.c
index 592a5b14ba..e02269f6eb 100644
--- a/src/platform/nm-linux-platform.c
+++ b/src/platform/nm-linux-platform.c
@@ -3362,7 +3362,7 @@ typedef struct {
WaitForNlResponseResult *out_seq_result;
char **out_errmsg;
union {
- gint *out_refresh_all_in_progess;
+ int *out_refresh_all_in_progess;
NMPObject **out_route_get;
gpointer out_data;
} response;
@@ -3394,13 +3394,13 @@ typedef struct {
/* counter that a refresh all action is in progress, separated
* by type. */
- gint refresh_all_in_progess[_DELAYED_ACTION_IDX_REFRESH_ALL_NUM];
+ int refresh_all_in_progess[_DELAYED_ACTION_IDX_REFRESH_ALL_NUM];
GPtrArray *list_master_connected;
GPtrArray *list_refresh_link;
GArray *list_wait_for_nl_response;
- gint is_handling;
+ int is_handling;
} delayed_action;
int wireguard_family_id;
@@ -3923,7 +3923,7 @@ delayed_action_wait_for_nl_response_complete_check (NMPlatform *platform,
guint i;
guint32 next_seq_number = 0;
gint64 next_timeout_abs_ns = 0;
- gint now_ns = 0;
+ int now_ns = 0;
for (i = 0; i < priv->delayed_action.list_wait_for_nl_response->len; ) {
const DelayedActionWaitForNlResponseData *data = &g_array_index (priv->delayed_action.list_wait_for_nl_response, DelayedActionWaitForNlResponseData, i);
@@ -4621,7 +4621,7 @@ do_request_all_no_delayed_actions (NMPlatform *platform, DelayedActionType actio
const NMPClass *klass = nmp_class_from_type (obj_type);
nm_auto_nlmsg struct nl_msg *nlmsg = NULL;
int nle;
- gint *out_refresh_all_in_progess;
+ int *out_refresh_all_in_progess;
out_refresh_all_in_progess = &priv->delayed_action.refresh_all_in_progess[delayed_action_refresh_all_to_idx (iflags)];
nm_assert (*out_refresh_all_in_progess >= 0);
diff --git a/src/platform/nm-platform.c b/src/platform/nm-platform.c
index 94a5ab0101..96465e3dd5 100644
--- a/src/platform/nm-platform.c
+++ b/src/platform/nm-platform.c
@@ -3787,7 +3787,7 @@ ip6_address_scope_priority (const struct in6_addr *addr)
return 3;
}
-static gint
+static int
ip6_address_scope_cmp (gconstpointer a, gconstpointer b)
{
const NMPlatformIP6Address *x = NMP_OBJECT_CAST_IP6_ADDRESS (*(const void **) a);
diff --git a/src/platform/tests/test-common.h b/src/platform/tests/test-common.h
index ed6e5791a0..1baadfa116 100644
--- a/src/platform/tests/test-common.h
+++ b/src/platform/tests/test-common.h
@@ -80,7 +80,7 @@ typedef struct {
gulong handler_id;
const char *name;
NMPlatformSignalChangeType change_type;
- gint received_count;
+ int received_count;
GMainLoop *loop;
int ifindex;
const char *ifname;
diff --git a/src/platform/tests/test-link.c b/src/platform/tests/test-link.c
index ce0bb49e4f..854285357a 100644
--- a/src/platform/tests/test-link.c
+++ b/src/platform/tests/test-link.c
@@ -1835,7 +1835,7 @@ test_create_many_links_do (guint n_devices)
char name[64];
const NMPlatformLink *pllink;
gs_unref_array GArray *ifindexes = g_array_sized_new (FALSE, FALSE, sizeof (int), n_devices);
- const gint EX = ((int) (nmtst_get_rand_int () % 4)) - 1;
+ const int EX = ((int) (nmtst_get_rand_int () % 4)) - 1;
g_assert (EX >= -1 && EX <= 2);
diff --git a/src/ppp/nm-ppp-manager.c b/src/ppp/nm-ppp-manager.c
index 5e893c8579..fdec4763dc 100644
--- a/src/ppp/nm-ppp-manager.c
+++ b/src/ppp/nm-ppp-manager.c
@@ -695,7 +695,7 @@ nm_cmd_line_to_str (NMCmdLine *cmd)
char *str;
g_ptr_array_add (cmd->array, NULL);
- str = g_strjoinv (" ", (gchar **) cmd->array->pdata);
+ str = g_strjoinv (" ", (char **) cmd->array->pdata);
g_ptr_array_remove_index (cmd->array, cmd->array->len - 1);
return str;
@@ -874,13 +874,13 @@ create_pppd_cmd_line (NMPPPManager *self,
nm_cmd_line_add_string (cmd, pppoe_service);
}
} else if (adsl) {
- const gchar *protocol = nm_setting_adsl_get_protocol (adsl);
+ const char *protocol = nm_setting_adsl_get_protocol (adsl);
if (!strcmp (protocol, NM_SETTING_ADSL_PROTOCOL_PPPOA)) {
guint32 vpi = nm_setting_adsl_get_vpi (adsl);
guint32 vci = nm_setting_adsl_get_vci (adsl);
const char *encaps = nm_setting_adsl_get_encapsulation (adsl);
- gchar *vpivci;
+ char *vpivci;
nm_cmd_line_add_string (cmd, "plugin");
nm_cmd_line_add_string (cmd, "pppoatm.so");
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);
diff --git a/src/supplicant/nm-supplicant-config.c b/src/supplicant/nm-supplicant-config.c
index 80db5baa1c..db2fe305ba 100644
--- a/src/supplicant/nm-supplicant-config.c
+++ b/src/supplicant/nm-supplicant-config.c
@@ -949,7 +949,7 @@ add_pkcs11_uri_with_pin (NMSupplicantConfig *self,
const NMSettingSecretFlags pin_flags,
GError **error)
{
- gs_strfreev gchar **split = NULL;
+ gs_strfreev char **split = NULL;
gs_free char *tmp = NULL;
gs_free char *tmp_log = NULL;
gs_free char *pin_qattr = NULL;
diff --git a/src/supplicant/nm-supplicant-settings-verify.c b/src/supplicant/nm-supplicant-settings-verify.c
index 317afff9d1..8a0cadc7f6 100644
--- a/src/supplicant/nm-supplicant-settings-verify.c
+++ b/src/supplicant/nm-supplicant-settings-verify.c
@@ -220,7 +220,7 @@ validate_type_keyword (const struct Opt * opt,
const guint32 len)
{
char **allowed;
- gchar **candidates = NULL;
+ char **candidates = NULL;
char **candidate;
gboolean found = FALSE;
diff --git a/src/systemd/nm-sd.c b/src/systemd/nm-sd.c
index e05b345b57..cbef91d1fe 100644
--- a/src/systemd/nm-sd.c
+++ b/src/systemd/nm-sd.c
@@ -35,7 +35,7 @@ typedef struct SDEventSource {
} SDEventSource;
static gboolean
-event_prepare (GSource *source, gint *timeout_)
+event_prepare (GSource *source, int *timeout_)
{
return sd_event_prepare (((SDEventSource *) source)->event) > 0;
}
diff --git a/src/tests/test-general.c b/src/tests/test-general.c
index 4db05ac847..a602feed75 100644
--- a/src/tests/test-general.c
+++ b/src/tests/test-general.c
@@ -1205,7 +1205,7 @@ test_match_spec_device (void)
/*****************************************************************************/
static void
-_do_test_match_spec_config (const char *file, gint line, const char *spec_str, guint version, guint v_maj, guint v_min, guint v_mic, NMMatchSpecMatchType expected)
+_do_test_match_spec_config (const char *file, int line, const char *spec_str, guint version, guint v_maj, guint v_min, guint v_mic, NMMatchSpecMatchType expected)
{
GSList *specs;
NMMatchSpecMatchType match_result;
diff --git a/src/vpn/nm-vpn-connection.h b/src/vpn/nm-vpn-connection.h
index 3046634d5f..e409cc314f 100644
--- a/src/vpn/nm-vpn-connection.h
+++ b/src/vpn/nm-vpn-connection.h
@@ -59,7 +59,7 @@ void nm_vpn_connection_activate (NMVpnConnection *self,
NMVpnPluginInfo *plugin_info);
NMVpnConnectionState nm_vpn_connection_get_vpn_state (NMVpnConnection *self);
const char * nm_vpn_connection_get_banner (NMVpnConnection *self);
-const gchar * nm_vpn_connection_get_service (NMVpnConnection *self);
+const char * nm_vpn_connection_get_service (NMVpnConnection *self);
gboolean nm_vpn_connection_deactivate (NMVpnConnection *self,
NMActiveConnectionStateReason reason,