all: merge branch 'th/style-fixes-int-types'

https://github.com/NetworkManager/NetworkManager/pull/164
This commit is contained in:
Thomas Haller 2018-07-11 12:03:36 +02:00
commit 2abf4652d4
145 changed files with 601 additions and 593 deletions

View file

@ -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;

View file

@ -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';
}

View file

@ -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;
}
}

View file

@ -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;

View file

@ -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)
{

View file

@ -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,

View file

@ -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,

View file

@ -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;

View file

@ -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);

View file

@ -97,6 +97,7 @@ if ($is_patch) {
$line = $2;
} elsif ($is_file) {
$line_no = $.;
$. = 0 if eof;
# This is a line from full C file
$check_line = 1;
$line = $_;
@ -116,9 +117,18 @@ if ($is_file and $filename ne $ARGV) {
}
next unless $filename =~ /\.[ch]$/;
next if $filename =~ /\/nm-[^\/]+-enum-types\.[ch]$/;
next if $filename =~ /\bsrc\/systemd\//
and not $filename =~ /\/sd-adapt\//
and not $filename =~ /\/nm-/;
next if $filename =~ /\/(n-acd|c-list|c-siphash)\//;
complain ('Tab following a space') if $line =~ / \t/;
complain ('Tabs are only allowed at the beginning of a line') if $line =~ /[^\t]\t/;
complain ('Trailing whitespace') if $line =~ /[ \t]$/;
complain ('Don\'t use glib typedefs for char/short/int/long/float/double') if $line =~ /\bg(char|short|int|long|float|double)\b/;
complain ("Don't use \"$1 $2\" instead of \"$2 $1\"") if $line =~ /\b(char|short|int|long) +(unsigned|signed)\b/;
complain ("Don't use \"unsigned int\" but just use \"unsigned\"") if $line =~ /\b(unsigned) +(int)\b/;
complain ("Please use LGPL2+ for new files") if $is_patch and $line =~ /under the terms of the GNU General Public License/;
# Further on we process stuff without comments.
$_ = $line;

View file

@ -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;

View file

@ -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}"));

View file

@ -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);

View file

@ -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);

View file

@ -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 */

View file

@ -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);

View file

@ -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)
{

View file

@ -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;

View file

@ -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);

View file

@ -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 ();
}

View file

@ -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;

View file

@ -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);

View file

@ -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

View file

@ -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++) {

View file

@ -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);

View file

@ -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);

View file

@ -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)

View file

@ -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);

View file

@ -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);

View file

@ -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

View file

@ -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,

View file

@ -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);

View file

@ -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

View file

@ -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);

View file

@ -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

View file

@ -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;

View file

@ -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);

View file

@ -172,7 +172,7 @@ typedef struct {
GObjectClass parent;
/* Virtual functions */
gint (*verify) (NMSetting *setting,
int (*verify) (NMSetting *setting,
NMConnection *connection,
GError **error);

View file

@ -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);
}

View file

@ -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);

View file

@ -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;

View file

@ -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];

View file

@ -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);

View file

@ -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);

View file

@ -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);

View file

@ -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);

View file

@ -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:

View file

@ -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);

View file

@ -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 */

View file

@ -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)

View file

@ -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++) {

View file

@ -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)

View file

@ -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);

View file

@ -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);

View file

@ -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;

View file

@ -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)
{

View file

@ -182,7 +182,7 @@ typedef struct {
GObjectClass parent;
/* Virtual functions */
gint (*verify) (NMSetting *setting,
int (*verify) (NMSetting *setting,
GSList *all_settings,
GError **error);

View file

@ -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, '?');
}

View file

@ -111,7 +111,7 @@ def init_constants(girxml, settings):
setting_name = constants[setting_name_symbol]
setting_names[setting_type_name] = setting_name
def get_prop_type(setting, pspec, propxml):
def get_prop_type(setting, pspec):
dbus_type = setting.get_dbus_property_type(pspec.name).dup_string()
prop_type = dbus_type_name_map[dbus_type]
@ -156,11 +156,9 @@ def get_default_value(setting, pspec, propxml):
if default_value is None:
return default_value
value_type = get_prop_type(setting, pspec, propxml)
value_type = get_prop_type(setting, pspec)
if value_type == 'string' and default_value != '' and pspec.name != 'name':
default_value = '"%s"' % default_value
elif value_type == 'gchar' and default_value != '':
default_value = "'%s'" % default_value
elif value_type == 'boolean':
default_value = str(default_value).upper()
elif value_type == 'byte array':
@ -251,7 +249,7 @@ for settingxml in settings:
if propxml is None:
propxml = ipxml.find('./gi:property[@name="%s"]' % pspec.name, ns_map)
value_type = get_prop_type(setting, pspec, propxml)
value_type = get_prop_type(setting, pspec)
value_desc = get_docs(propxml)
default_value = get_default_value(setting, pspec, propxml)

View file

@ -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:

View file

@ -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);

View file

@ -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));

View file

@ -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

View file

@ -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);

View file

@ -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);

View file

@ -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)) {

View file

@ -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));

View file

@ -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);

View file

@ -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)
{

View file

@ -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;

View file

@ -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);

View file

@ -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);
/*****************************************************************************/

View file

@ -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;

View file

@ -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

View file

@ -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;

View file

@ -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);

View file

@ -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 */

View file

@ -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));

View file

@ -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;

View file

@ -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);

View file

@ -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);

View file

@ -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;

View file

@ -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;

View file

@ -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);

View file

@ -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__ */

View file

@ -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:

View file

@ -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 */

View file

@ -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);

View file

@ -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)

View file

@ -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);

View file

@ -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) {

View file

@ -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;

View file

@ -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) {

View file

@ -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);

View file

@ -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)

View file

@ -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);

View file

@ -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,

View file

@ -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,

View file

@ -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);

View file

@ -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;

Some files were not shown because too many files have changed in this diff Show more