]> git.ipfire.org Git - thirdparty/iw.git/commitdiff
iw: tiny code style fixes
authorJohannes Berg <johannes.berg@intel.com>
Fri, 24 Apr 2020 09:53:03 +0000 (11:53 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Fri, 24 Apr 2020 09:53:16 +0000 (11:53 +0200)
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
bitrate.c
event.c
scan.c

index 4a026a48e1ba8b2ef26b98a4c257d7e9a284e5a4..780017f188358fab8b5b23aef046cc5a7ba02334 100644 (file)
--- a/bitrate.c
+++ b/bitrate.c
@@ -64,7 +64,7 @@ static int setup_vht(struct nl80211_txrate_vht *txrate_vht,
        memset(txrate_vht, 0, sizeof(*txrate_vht));
 
        for (i = 0; i < argc; i++) {
-               if(!parse_vht_chunk(argv[i], &nss, &mcs))
+               if (!parse_vht_chunk(argv[i], &nss, &mcs))
                        return 0;
 
                nss--;
@@ -200,11 +200,11 @@ static int handle_bitrates(struct nl80211_state *state,
        }
 
        if (have_vht_mcs_24)
-               if(!setup_vht(&txrate_vht_24, vht_argc_24, vht_argv_24))
+               if (!setup_vht(&txrate_vht_24, vht_argc_24, vht_argv_24))
                        return -EINVAL;
 
        if (have_vht_mcs_5)
-               if(!setup_vht(&txrate_vht_5, vht_argc_5, vht_argv_5))
+               if (!setup_vht(&txrate_vht_5, vht_argc_5, vht_argv_5))
                        return -EINVAL;
 
        if (sgi_5 && lgi_5)
diff --git a/event.c b/event.c
index 9648473bbe928e9bab3fc978f7350e0ffcfaca2a..fdd25ae98380ed9c2a3fbb5da4ebd7fa68fcc3ab 100644 (file)
--- a/event.c
+++ b/event.c
@@ -881,7 +881,7 @@ static int print_event(struct nl_msg *msg, void *arg)
 
        if (tb[NL80211_ATTR_IFINDEX] && tb[NL80211_ATTR_WIPHY]) {
                /* if_indextoname may fails on delete interface/wiphy event */
-               if(if_indextoname(nla_get_u32(tb[NL80211_ATTR_IFINDEX]), ifname))
+               if (if_indextoname(nla_get_u32(tb[NL80211_ATTR_IFINDEX]), ifname))
                        printf("%s (phy #%d): ", ifname, nla_get_u32(tb[NL80211_ATTR_WIPHY]));
                else
                        printf("phy #%d: ", nla_get_u32(tb[NL80211_ATTR_WIPHY]));
@@ -936,7 +936,7 @@ static int print_event(struct nl_msg *msg, void *arg)
                break;
        case NL80211_CMD_WIPHY_REG_CHANGE:
        case NL80211_CMD_REG_CHANGE:
-               if(gnlh->cmd == NL80211_CMD_WIPHY_REG_CHANGE)
+               if (gnlh->cmd == NL80211_CMD_WIPHY_REG_CHANGE)
                        printf("regulatory domain change (phy): ");
                else
                        printf("regulatory domain change: ");
diff --git a/scan.c b/scan.c
index 57d4e9c9bfa17f206d357b82af6d177f4d684f43..a0683842cb4002710eb06d28c67ee5b6fd364419 100644 (file)
--- a/scan.c
+++ b/scan.c
@@ -1557,7 +1557,7 @@ static void print_measurement_pilot_tx(const uint8_t type, uint8_t len,
        printf("\n");
        printf("\t\t * interval: %d TUs\n", data[0]);
 
-       if(len <= 1)
+       if (len <= 1)
                return;
 
        p = (uint8_t *) data + 1;