]> git.ipfire.org Git - thirdparty/iw.git/commitdiff
fix output qualifier for unsigned values
authorArnd Hannemann <hannemann@nets.rwth-aachen.de>
Mon, 17 Aug 2009 10:46:56 +0000 (12:46 +0200)
committerJohannes Berg <johannes@sipsolutions.net>
Mon, 17 Aug 2009 10:51:02 +0000 (12:51 +0200)
Station XX:XX:XX:XX:XX:XX (on wlan0)
        inactive time:  4 ms
        rx bytes:       -1611945626
        rx packets:     7643414
        tx bytes:       1527923993
        tx packets:     4829428
        signal:         -63 dBm
        tx bitrate:     54.0 MBit/s

Seems to be the output qualifier %d is used wrongly in some cases.
This patch fixes that.

Signed-off-by: Arnd Hannemann <hannemann@nets.rwth-aachen.de>
station.c

index b8e9c7916c358259174c7b2dca9996c6c755e665..33a9cadebd1eddb819967da32c6f1f86e2e35fb1 100644 (file)
--- a/station.c
+++ b/station.c
@@ -80,19 +80,19 @@ static int print_sta_handler(struct nl_msg *msg, void *arg)
        printf("Station %s (on %s)", mac_addr, dev);
 
        if (sinfo[NL80211_STA_INFO_INACTIVE_TIME])
-               printf("\n\tinactive time:\t%d ms",
+               printf("\n\tinactive time:\t%u ms",
                        nla_get_u32(sinfo[NL80211_STA_INFO_INACTIVE_TIME]));
        if (sinfo[NL80211_STA_INFO_RX_BYTES])
-               printf("\n\trx bytes:\t%d",
+               printf("\n\trx bytes:\t%u",
                        nla_get_u32(sinfo[NL80211_STA_INFO_RX_BYTES]));
        if (sinfo[NL80211_STA_INFO_RX_PACKETS])
-               printf("\n\trx packets:\t%d",
+               printf("\n\trx packets:\t%u",
                        nla_get_u32(sinfo[NL80211_STA_INFO_RX_PACKETS]));
        if (sinfo[NL80211_STA_INFO_TX_BYTES])
-               printf("\n\ttx bytes:\t%d",
+               printf("\n\ttx bytes:\t%u",
                        nla_get_u32(sinfo[NL80211_STA_INFO_TX_BYTES]));
        if (sinfo[NL80211_STA_INFO_TX_PACKETS])
-               printf("\n\ttx packets:\t%d",
+               printf("\n\ttx packets:\t%u",
                        nla_get_u32(sinfo[NL80211_STA_INFO_TX_PACKETS]));
        if (sinfo[NL80211_STA_INFO_SIGNAL])
                printf("\n\tsignal:  \t%d dBm",