From: John Whitmore Date: Wed, 4 Jul 2018 14:20:49 +0000 (+0100) Subject: staging: rtl8192u: Use memset to initialize memory, instead of loop. X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=868e346c1c5c4b0dac7765b63a85f986dba15a49;p=openwrt%2Fstaging%2Fblogic.git staging: rtl8192u: Use memset to initialize memory, instead of loop. Replaced memory initialising loop with memset instead. Suggested-by: Andy Shevchenko Signed-off-by: John Whitmore Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c b/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c index a549d9678214..abf55877331e 100644 --- a/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c +++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c @@ -761,8 +761,6 @@ void HTConstructRT2RTAggElement(struct ieee80211_device *ieee, u8 *posRT2RTAgg, */ static u8 HT_PickMCSRate(struct ieee80211_device *ieee, u8 *pOperateMCS) { - u8 i; - if (!pOperateMCS) { IEEE80211_DEBUG(IEEE80211_DL_ERR, "pOperateMCS can't be null in %s\n", @@ -777,8 +775,7 @@ static u8 HT_PickMCSRate(struct ieee80211_device *ieee, u8 *pOperateMCS) //legacy rate routine handled at selectedrate //no MCS rate - for (i = 0; i <= 15; i++) - pOperateMCS[i] = 0; + memset(pOperateMCS, 0, 16); break; case IEEE_N_24G: //assume CCK rate ok