Browse Source

qcacmn: Use size_t for qdf_str_len() return type

A recent commit changed the return type for qdf_str_len() to size_t from
int32_t. Update call sites for qdf_str_len() to store the return value
as size_t to match.

Change-Id: Ib8bfad2c1fc7de1f6fc601d1be69e734d3a49dcf
CRs-Fixed: 2196858
Dustin Brown 7 years ago
parent
commit
013ae979a6
2 changed files with 5 additions and 5 deletions
  1. 4 4
      os_if/linux/nan/src/os_if_nan.c
  2. 1 1
      qdf/src/qdf_parse.c

+ 4 - 4
os_if/linux/nan/src/os_if_nan.c

@@ -775,7 +775,7 @@ static void os_if_ndp_indication_handler(struct wlan_objmgr_vdev *vdev,
 {
 	uint8_t *ifname;
 	uint16_t data_len;
-	uint8_t ifname_len;
+	qdf_size_t ifname_len;
 	uint32_t ndp_qos_config;
 	struct sk_buff *vendor_event;
 	enum nan_datapath_state state;
@@ -806,7 +806,7 @@ static void os_if_ndp_indication_handler(struct wlan_objmgr_vdev *vdev,
 	}
 	ifname_len = qdf_str_len(ifname);
 	if (ifname_len > IFNAMSIZ) {
-		cfg80211_err("ifname(%d) too long", ifname_len);
+		cfg80211_err("ifname(%zu) too long", ifname_len);
 		return;
 	}
 
@@ -915,7 +915,7 @@ static void os_if_ndp_confirm_ind_handler(struct wlan_objmgr_vdev *vdev,
 	uint8_t *ifname;
 	uint32_t data_len;
 	QDF_STATUS status;
-	uint8_t ifname_len;
+	qdf_size_t ifname_len;
 	uint32_t ndp_qos_config = 0;
 	struct sk_buff *vendor_event;
 	struct wlan_objmgr_pdev *pdev = wlan_vdev_get_pdev(vdev);
@@ -956,7 +956,7 @@ static void os_if_ndp_confirm_ind_handler(struct wlan_objmgr_vdev *vdev,
 	}
 	ifname_len = qdf_str_len(ifname);
 	if (ifname_len > IFNAMSIZ) {
-		cfg80211_err("ifname(%d) too long", ifname_len);
+		cfg80211_err("ifname(%zu) too long", ifname_len);
 		return;
 	}
 

+ 1 - 1
qdf/src/qdf_parse.c

@@ -100,7 +100,7 @@ QDF_STATUS qdf_ini_parse(const char *ini_path, void *context,
 			if (QDF_IS_STATUS_ERROR(status))
 				goto free_fbuf;
 		} else if (key[0] == '[') {
-			int32_t len = qdf_str_len(key);
+			qdf_size_t len = qdf_str_len(key);
 
 			if (key[len - 1] != ']') {
 				qdf_err("Invalid *.ini syntax '%s'", key);