From 361c95119a60adb7f84946af648b7c87cdc55e17 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Thu, 26 Nov 2009 12:22:11 -0300 Subject: V4L/DVB (13530): Fix wrong parameter order in memset MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Edwin Török found the following: In function ‘memset’, inlined from ‘ir_input_init’ at drivers/media/common/ir-functions.c:67: /home/edwin/builds/linux-2.6/arch/x86/include/asm/string_64.h:61: warning: call to ‘__warn_memset_zero_len’ declared with attribute warning: memset used with constant zero length parameter; this could be due to transposed parameters memset(ir->ir_codes, sizeof(ir->ir_codes), 0); In actual practice the only caller I can find happens to already have cleared the buffer before calling ir_input_init. Signed-off-by: Alan Cox Signed-off-by: Mauro Carvalho Chehab --- drivers/media/common/ir-functions.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/media/common') diff --git a/drivers/media/common/ir-functions.c b/drivers/media/common/ir-functions.c index 655474b29e2..abd4791acb0 100644 --- a/drivers/media/common/ir-functions.c +++ b/drivers/media/common/ir-functions.c @@ -64,7 +64,7 @@ void ir_input_init(struct input_dev *dev, struct ir_input_state *ir, ir->ir_type = ir_type; - memset(ir->ir_codes, sizeof(ir->ir_codes), 0); + memset(ir->ir_codes, 0, sizeof(ir->ir_codes)); /* * FIXME: This is a temporary workaround to use the new IR tables -- cgit v1.2.3-18-g5258