net/wapi: remove unnecessary cast

This commit is contained in:
chao.an 2020-02-19 20:50:02 +08:00 • committed by Ouss4
parent ae36b6f8a9
commit ee615f0568
4 changed files with 10 additions and 14 deletions

View file

@ -83,7 +83,7 @@
****************************************************************************/
int wpa_driver_wext_set_key_ext(int sockfd, FAR const char *ifname,
enum wpa_alg_e alg, FAR const uint8_t *key,
enum wpa_alg_e alg, FAR const char *key,
size_t key_len)
{
struct iwreq iwr;
@ -217,8 +217,7 @@ int wpa_driver_wext_associate(FAR struct wpa_wconfig_s *wconfig)
goto close_socket;
}
ret = wapi_set_essid(sockfd, wconfig->ifname,
(FAR const char *)wconfig->ssid, WAPI_ESSID_ON);
ret = wapi_set_essid(sockfd, wconfig->ifname, wconfig->ssid, WAPI_ESSID_ON);
if (ret < 0)
{
nerr("ERROR: Fail set ssid: %d\n", ret);

View file

@ -535,8 +535,7 @@ static void wapi_psk_cmd(int sock, FAR const char *ifname,
/* Set the Passphrase */
ret = wpa_driver_wext_set_key_ext(sock, ifname, alg_flag,
(FAR const uint8_t *)passphrase,
strlen(passphrase));
passphrase, strlen(passphrase));
if (ret < 0)
{
WAPI_ERROR("ERROR: wpa_driver_wext_set_key_ext() failed: %d\n", ret);