diff options
Diffstat (limited to 'src')
68 files changed, 238 insertions, 238 deletions
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, |