all: use "unsigned" instead of "unsigned int"

This commit is contained in:
Thomas Haller
2017-03-14 11:15:05 +01:00
parent b1eeb00937
commit 22b7282d84
10 changed files with 14 additions and 14 deletions

View File

@@ -1294,7 +1294,7 @@ nmc_unique_connection_name (const GPtrArray *connections, const char *try_name)
NMConnection *connection; NMConnection *connection;
const char *name; const char *name;
char *new_name; char *new_name;
unsigned int num = 1; unsigned num = 1;
int i = 0; int i = 0;
new_name = g_strdup (try_name); new_name = g_strdup (try_name);

View File

@@ -3555,7 +3555,7 @@ unique_master_iface_ifname (const GPtrArray *connections,
{ {
NMConnection *connection; NMConnection *connection;
char *new_name; char *new_name;
unsigned int num = 1; unsigned num = 1;
int i = 0; int i = 0;
const char *ifname = NULL; const char *ifname = NULL;

View File

@@ -323,7 +323,7 @@ get_available_iface_name (const char *try_name,
const GPtrArray *connections; const GPtrArray *connections;
NMConnection *connection; NMConnection *connection;
char *new_name; char *new_name;
unsigned int num = 1; unsigned num = 1;
int i = 0; int i = 0;
const char *ifname = NULL; const char *ifname = NULL;

View File

@@ -239,7 +239,7 @@ if test "$with_wifi" = "yes"; then
#include <linux/types.h> #include <linux/types.h>
#include <sys/socket.h> #include <sys/socket.h>
#include <linux/nl80211.h>]], #include <linux/nl80211.h>]],
[[unsigned int a = NL80211_CMD_CRIT_PROTOCOL_START; a++;]])], [[unsigned a = NL80211_CMD_CRIT_PROTOCOL_START; a++;]])],
[ac_have_nl80211_critproto=yes], [ac_have_nl80211_critproto=yes],
[ac_have_nl80211_critproto=no]) [ac_have_nl80211_critproto=no])
AC_MSG_RESULT($ac_have_nl80211_critproto) AC_MSG_RESULT($ac_have_nl80211_critproto)
@@ -264,7 +264,7 @@ AC_COMPILE_IFELSE(
#include <sys/types.h> #include <sys/types.h>
#include <linux/types.h> #include <linux/types.h>
#include <linux/if_vlan.h>]], #include <linux/if_vlan.h>]],
[[unsigned int a = VLAN_FLAG_LOOSE_BINDING;]])], [[unsigned a = VLAN_FLAG_LOOSE_BINDING;]])],
[ac_have_vlan_flag_loose_binding=yes], [ac_have_vlan_flag_loose_binding=yes],
[ac_have_vlan_flag_loose_binding=no]) [ac_have_vlan_flag_loose_binding=no])
AC_MSG_RESULT($ac_have_vlan_flag_loose_binding) AC_MSG_RESULT($ac_have_vlan_flag_loose_binding)

View File

@@ -91,7 +91,7 @@ crypto_decrypt (const char *cipher,
PK11Context *ctx = NULL; PK11Context *ctx = NULL;
SECStatus s; SECStatus s;
gboolean success = FALSE; gboolean success = FALSE;
unsigned int pad_len = 0, extra = 0; unsigned pad_len = 0, extra = 0;
guint32 i, real_iv_len = 0; guint32 i, real_iv_len = 0;
if (!crypto_init (error)) if (!crypto_init (error))

View File

@@ -184,7 +184,7 @@ verify (NMSetting *setting, NMConnection *connection, GError **error)
g_set_error (error, g_set_error (error,
NM_CONNECTION_ERROR, NM_CONNECTION_ERROR,
NM_CONNECTION_ERROR_INVALID_PROPERTY, NM_CONNECTION_ERROR_INVALID_PROPERTY,
_("'%u': invalid mode"), (unsigned int) priv->mode); _("'%u': invalid mode"), (unsigned) priv->mode);
g_prefix_error (error, "%s.%s: ", NM_SETTING_TUN_SETTING_NAME, NM_SETTING_TUN_MODE); g_prefix_error (error, "%s.%s: ", NM_SETTING_TUN_SETTING_NAME, NM_SETTING_TUN_MODE);
return FALSE; return FALSE;
} }

View File

@@ -79,7 +79,7 @@ crypto_md5_hash (const char *salt,
{ {
PK11Context *ctx; PK11Context *ctx;
int nkey = buflen; int nkey = buflen;
unsigned int digest_len; unsigned digest_len;
int count = 0; int count = 0;
char digest[MD5_HASH_LEN]; char digest[MD5_HASH_LEN];
char *p = buffer; char *p = buffer;
@@ -144,7 +144,7 @@ crypto_decrypt (const char *cipher,
PK11Context *ctx = NULL; PK11Context *ctx = NULL;
SECStatus s; SECStatus s;
gboolean success = FALSE; gboolean success = FALSE;
unsigned int pad_len = 0, extra = 0; unsigned pad_len = 0, extra = 0;
guint32 i, real_iv_len = 0; guint32 i, real_iv_len = 0;
if (!strcmp (cipher, CIPHER_DES_EDE3_CBC)) { if (!strcmp (cipher, CIPHER_DES_EDE3_CBC)) {

View File

@@ -2551,7 +2551,7 @@ set_powersave (NMDevice *device)
NM_SETTING_WIRELESS_POWERSAVE_IGNORE); NM_SETTING_WIRELESS_POWERSAVE_IGNORE);
} }
_LOGT (LOGD_WIFI, "powersave is set to %u", (unsigned int) powersave); _LOGT (LOGD_WIFI, "powersave is set to %u", (unsigned) powersave);
if (powersave == NM_SETTING_WIRELESS_POWERSAVE_IGNORE) if (powersave == NM_SETTING_WIRELESS_POWERSAVE_IGNORE)
return; return;

View File

@@ -4738,7 +4738,7 @@ vlan_add (NMPlatform *platform,
vlan_flags &= (guint32) NM_VLAN_FLAGS_ALL; vlan_flags &= (guint32) NM_VLAN_FLAGS_ALL;
_LOGD ("link: add vlan '%s', parent %d, vlan id %d, flags %X", _LOGD ("link: add vlan '%s', parent %d, vlan id %d, flags %X",
name, parent, vlan_id, (unsigned int) vlan_flags); name, parent, vlan_id, (unsigned) vlan_flags);
nlmsg = _nl_msg_new_link (RTM_NEWLINK, nlmsg = _nl_msg_new_link (RTM_NEWLINK,
NLM_F_CREATE | NLM_F_EXCL, NLM_F_CREATE | NLM_F_EXCL,

View File

@@ -42,8 +42,8 @@
* utils * utils
******************************************************************/ ******************************************************************/
extern char *if_indextoname (unsigned int __ifindex, char *__ifname); extern char *if_indextoname (unsigned __ifindex, char *__ifname);
unsigned int if_nametoindex (const char *__ifname); unsigned if_nametoindex (const char *__ifname);
const char * const char *
nmp_utils_if_indextoname (int ifindex, char *out_ifname/*IFNAMSIZ*/) nmp_utils_if_indextoname (int ifindex, char *out_ifname/*IFNAMSIZ*/)
@@ -440,7 +440,7 @@ nmp_utils_ethtool_set_wake_on_lan (int ifindex,
return TRUE; return TRUE;
nm_log_dbg (LOGD_PLATFORM, "setting Wake-on-LAN options 0x%x, password '%s'", nm_log_dbg (LOGD_PLATFORM, "setting Wake-on-LAN options 0x%x, password '%s'",
(unsigned int) wol, wol_password); (unsigned) wol, wol_password);
wol_info.cmd = ETHTOOL_SWOL; wol_info.cmd = ETHTOOL_SWOL;
wol_info.wolopts = 0; wol_info.wolopts = 0;