[PATCH 2/3] network: Substitute connman_uint8_t and connman_uint16_t usage

patrik.flykt at linux.intel.com patrik.flykt at linux.intel.com
Fri Nov 30 00:34:44 PST 2012


From: Patrik Flykt <patrik.flykt at linux.intel.com>

connman_uint8_t' and 'connman_uint16_t' are rarely used, substitute them
with the real type instead.
---
 include/network.h |   12 ++++++------
 src/network.c     |   16 ++++++++--------
 2 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/include/network.h b/include/network.h
index 3945a54..07f1095 100644
--- a/include/network.h
+++ b/include/network.h
@@ -119,14 +119,14 @@ int connman_network_set_domain(struct connman_network *network,
 int connman_network_set_name(struct connman_network *network,
 							const char *name);
 int connman_network_set_strength(struct connman_network *network,
-						connman_uint8_t strength);
-connman_uint8_t connman_network_get_strength(struct connman_network *network);
+						unsigned char strength);
+unsigned char connman_network_get_strength(struct connman_network *network);
 int connman_network_set_frequency(struct connman_network *network,
-					connman_uint16_t frequency);
-connman_uint16_t connman_network_get_frequency(struct connman_network *network);
+					unsigned short frequency);
+unsigned short connman_network_get_frequency(struct connman_network *network);
 int connman_network_set_wifi_channel(struct connman_network *network,
-					connman_uint16_t channel);
-connman_uint16_t connman_network_get_wifi_channel(struct connman_network *network);
+					unsigned short channel);
+unsigned short connman_network_get_wifi_channel(struct connman_network *network);
 
 int connman_network_set_string(struct connman_network *network,
 					const char *key, const char *value);
diff --git a/src/network.c b/src/network.c
index 5c66bbd..c7292da 100644
--- a/src/network.c
+++ b/src/network.c
@@ -50,8 +50,8 @@ struct connman_network {
 	connman_bool_t available;
 	connman_bool_t connected;
 	connman_bool_t roaming;
-	connman_uint8_t strength;
-	connman_uint16_t frequency;
+	unsigned char strength;
+	unsigned short frequency;
 	char *identifier;
 	char *name;
 	char *node;
@@ -1784,7 +1784,7 @@ int connman_network_set_name(struct connman_network *network,
  */
 
 int connman_network_set_strength(struct connman_network *network,
-						connman_uint8_t strength)
+						unsigned char strength)
 {
 	DBG("network %p strengh %d", network, strength);
 
@@ -1793,13 +1793,13 @@ int connman_network_set_strength(struct connman_network *network,
 	return 0;
 }
 
-connman_uint8_t connman_network_get_strength(struct connman_network *network)
+unsigned char connman_network_get_strength(struct connman_network *network)
 {
 	return network->strength;
 }
 
 int connman_network_set_frequency(struct connman_network *network,
-						connman_uint16_t frequency)
+						unsigned short frequency)
 {
 	DBG("network %p frequency %d", network, frequency);
 
@@ -1808,13 +1808,13 @@ int connman_network_set_frequency(struct connman_network *network,
 	return 0;
 }
 
-connman_uint16_t connman_network_get_frequency(struct connman_network *network)
+unsigned short connman_network_get_frequency(struct connman_network *network)
 {
 	return network->frequency;
 }
 
 int connman_network_set_wifi_channel(struct connman_network *network,
-						connman_uint16_t channel)
+						unsigned short channel)
 {
 	DBG("network %p wifi channel %d", network, channel);
 
@@ -1823,7 +1823,7 @@ int connman_network_set_wifi_channel(struct connman_network *network,
 	return 0;
 }
 
-connman_uint16_t connman_network_get_wifi_channel(struct connman_network *network)
+unsigned short connman_network_get_wifi_channel(struct connman_network *network)
 {
 	return network->wifi.channel;
 }
-- 
1.7.10.4




More information about the connman mailing list