]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
staging: rtl8188eu: remove implicit bool->int conversions
authorAishwarya Pant <aishpant@gmail.com>
Fri, 22 Sep 2017 11:14:03 +0000 (16:44 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 29 Sep 2017 13:31:49 +0000 (15:31 +0200)
Implicit type conversions are bad; they hinder readability of code and have
potential to cause bugs. Here the variable wait_ack is always supplied a bool
value while in function declarations it is defined as an int type. Fix it by
defining wait_ack a bool type in all usages.

Signed-off-by: Aishwarya Pant <aishpant@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8188eu/core/rtw_mlme_ext.c

index 2db2ca6e6257f41da6abbdc545020aaaeec03613..99f3d5c949405b75645b96e4142421737af56eae 100644 (file)
@@ -1196,7 +1196,7 @@ static void issue_assocreq(struct adapter *padapter)
 }
 
 /* when wait_ack is true, this function should be called at process context */
-static int _issue_nulldata(struct adapter *padapter, unsigned char *da, unsigned int power_mode, int wait_ack)
+static int _issue_nulldata(struct adapter *padapter, unsigned char *da, unsigned int power_mode, bool wait_ack)
 {
        int ret = _FAIL;
        struct xmit_frame                       *pmgntframe;
@@ -1316,7 +1316,7 @@ int issue_nulldata(struct adapter *padapter, unsigned char *da, unsigned int pow
 }
 
 /* when wait_ack is true, this function should be called at process context */
-static int _issue_qos_nulldata(struct adapter *padapter, unsigned char *da, u16 tid, int wait_ack)
+static int _issue_qos_nulldata(struct adapter *padapter, unsigned char *da, u16 tid, bool wait_ack)
 {
        int ret = _FAIL;
        struct xmit_frame                       *pmgntframe;
@@ -1442,7 +1442,7 @@ int issue_qos_nulldata(struct adapter *padapter, unsigned char *da, u16 tid, int
        return ret;
 }
 
-static int _issue_deauth(struct adapter *padapter, unsigned char *da, unsigned short reason, u8 wait_ack)
+static int _issue_deauth(struct adapter *padapter, unsigned char *da, unsigned short reason, bool wait_ack)
 {
        struct xmit_frame                       *pmgntframe;
        struct pkt_attrib                       *pattrib;