From: damien Date: Mon, 1 Sep 2008 20:00:19 +0000 (+0000) Subject: use C99 style struct initializer instead of GCC specific one (from NetBSD). X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=b4d9563d678857f98439f88f3b13d94b75317573;p=openbsd use C99 style struct initializer instead of GCC specific one (from NetBSD). some whitespace cleanup too. --- diff --git a/sys/net80211/ieee80211_rssadapt.c b/sys/net80211/ieee80211_rssadapt.c index 1bb268bca12..f9b347cd9b5 100644 --- a/sys/net80211/ieee80211_rssadapt.c +++ b/sys/net80211/ieee80211_rssadapt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ieee80211_rssadapt.c,v 1.6 2007/06/16 13:17:05 damien Exp $ */ +/* $OpenBSD: ieee80211_rssadapt.c,v 1.7 2008/09/01 20:00:19 damien Exp $ */ /* $NetBSD: ieee80211_rssadapt.c,v 1.7 2004/05/25 04:33:59 dyoung Exp $ */ /*- @@ -73,13 +73,13 @@ int ieee80211_rssadapt_debug = 0; #define RSSADAPT_PRINTF(X) #endif -static struct ieee80211_rssadapt_expavgctl master_expavgctl = { - rc_decay_denom : 16, - rc_decay_old : 15, - rc_thresh_denom : 8, - rc_thresh_old : 4, - rc_avgrssi_denom : 8, - rc_avgrssi_old : 4 +static const struct ieee80211_rssadapt_expavgctl master_expavgctl = { + .rc_decay_denom = 16, + .rc_decay_old = 15, + .rc_thresh_denom = 8, + .rc_thresh_old = 4, + .rc_avgrssi_denom = 8, + .rc_avgrssi_old = 4 }; int @@ -245,8 +245,8 @@ ieee80211_rssadapt_raise_rate(struct ieee80211com *ic, rate = (rs->rs_rates[id->id_rateidx + 1] & IEEE80211_RATE_VAL); RSSADAPT_PRINTF(("%s: threshold[%d, %d.%d] decay %d ", - ic->ic_if.if_xname, - IEEE80211_RSSADAPT_BKT0 << (IEEE80211_RSSADAPT_BKTPOWER* i), + ic->ic_if.if_xname, IEEE80211_RSSADAPT_BKT0 << + (IEEE80211_RSSADAPT_BKTPOWER * i), rate / 2, rate * 5 % 10, (*thrs)[id->id_rateidx + 1])); oldthr = (*thrs)[id->id_rateidx + 1]; if ((*thrs)[id->id_rateidx] == 0)