diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2010-03-28 13:02:59 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2010-03-28 13:02:59 +0000 |
commit | a1fb7db67753590020570d81289407e56dde5853 (patch) | |
tree | d01e608bd91fbfad522535c454eba09939be5b35 /sys/dev | |
parent | 218a5b15263140b9a841fe5db5ac0b532a0bf411 (diff) |
Four uses of uninitialized variables found by clang via jsg@. ar5416, ar9287
and athn are only theoretically interesting. i33380211_node fixes a real
bug in occupied channel detection.
ok damien@
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/ic/ar5416.c | 4 | ||||
-rw-r--r-- | sys/dev/ic/ar9287.c | 4 | ||||
-rw-r--r-- | sys/dev/ic/athn.c | 3 |
3 files changed, 6 insertions, 5 deletions
diff --git a/sys/dev/ic/ar5416.c b/sys/dev/ic/ar5416.c index b9b6a55b07b..2df0ea48b3b 100644 --- a/sys/dev/ic/ar5416.c +++ b/sys/dev/ic/ar5416.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ar5416.c,v 1.4 2009/11/17 19:32:22 damien Exp $ */ +/* $OpenBSD: ar5416.c,v 1.5 2010/03/28 13:02:57 krw Exp $ */ /*- * Copyright (c) 2009 Damien Bergamini <damien.bergamini@free.fr> @@ -515,7 +515,7 @@ ar5416_set_txpower(struct athn_softc *sc, struct ieee80211_channel *c, uint8_t tpow_ht20[8], tpow_ht40[8]; uint8_t ht40inc; #endif - int16_t pwr, pwroff, max_ant_gain, power[ATHN_POWER_COUNT]; + int16_t pwr = 0, pwroff, max_ant_gain, power[ATHN_POWER_COUNT]; uint8_t cckinc; int i; diff --git a/sys/dev/ic/ar9287.c b/sys/dev/ic/ar9287.c index a738d17163f..d8aef15b69d 100644 --- a/sys/dev/ic/ar9287.c +++ b/sys/dev/ic/ar9287.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ar9287.c,v 1.4 2009/11/17 19:32:22 damien Exp $ */ +/* $OpenBSD: ar9287.c,v 1.5 2010/03/28 13:02:57 krw Exp $ */ /*- * Copyright (c) 2009 Damien Bergamini <damien.bergamini@free.fr> @@ -432,7 +432,7 @@ ar9287_set_txpower(struct athn_softc *sc, struct ieee80211_channel *c, uint8_t tpow_ht20[8], tpow_ht40[8]; uint8_t ht40inc; #endif - int16_t pwr, max_ant_gain, power[ATHN_POWER_COUNT]; + int16_t pwr = 0, max_ant_gain, power[ATHN_POWER_COUNT]; int i; /* Compute transmit power reduction due to antenna gain. */ diff --git a/sys/dev/ic/athn.c b/sys/dev/ic/athn.c index ea01087e4e9..dec4925384c 100644 --- a/sys/dev/ic/athn.c +++ b/sys/dev/ic/athn.c @@ -1,4 +1,4 @@ -/* $OpenBSD: athn.c,v 1.28 2010/02/24 20:09:19 damien Exp $ */ +/* $OpenBSD: athn.c,v 1.29 2010/03/28 13:02:57 krw Exp $ */ /*- * Copyright (c) 2009 Damien Bergamini <damien.bergamini@free.fr> @@ -2567,6 +2567,7 @@ athn_get_pdadcs(struct athn_softc *sc, uint8_t fbin, struct athn_pier *lopier, /* Compute Vpd table for this pdGain. */ nvpds = DB(maxpwr[i] - minpwr[i]) + 1; + memset(vpd, 0, sizeof(vpd)); pwr = minpwr[i]; for (j = 0; j < nvpds; j++) { /* Get lower and higher Vpd. */ |