[PATCH] staging: wilc1000: simplify 'memset' of 2D array

Gujulan Elango, Hari Prasath (H.) hgujulan at visteon.com
Thu Aug 20 09:59:44 UTC 2015


From: Hari Prasath Gujulan Elango <hgujulan at visteon.com>

This patch simplifies the 'memset' done on a static 2D array.

Signed-off-by: Hari Prasath Gujulan Elango <hgujulan at visteon.com>
---
 drivers/staging/wilc1000/host_interface.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
index 66fa677..908156e 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -1492,8 +1492,7 @@ static s32 Handle_Connect(tstrWILC_WFIDrv *drvHandler, tstrHostIFconnectAttr *ps
 	PRINT_D(GENERIC_DBG, "Handling connect request\n");
 
 	#ifndef CONNECT_DIRECT
-	memset(gapu8RcvdSurveyResults[0], 0, MAX_SURVEY_RESULT_FRAG_SIZE);
-	memset(gapu8RcvdSurveyResults[1], 0, MAX_SURVEY_RESULT_FRAG_SIZE);
+	memset(gapu8RcvdSurveyResults, 0, sizeof(gapu8RcvdSurveyResults));
 
 
 	PRINT_D(HOSTINF_DBG, "Getting site survey results\n");
-- 
1.9.1


More information about the devel mailing list