Skip to contentSkip to conversation

Fix argument order in memset call in ./drivers/media/common/ir-functions.c

PATCH Dave Jones 2 participants 2 messages Nov 11, 2009 – Nov 12, 2009 Media (V4L/DVB)

lore
Share & tools
lore

Dave Jones

author
#0 lore raw

Size is the third argument, not the second.

drivers/media/common/ir-functions.c +1 -1
index 655474b..abd4791 100644
@@ -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
Acked-by
#1 lore raw
Quoted 3 lines · Dave Jones

Size is the third argument, not the second.

Definitely yes.

Quoted 14 lines
drivers/media/common/ir-functions.c +1 -1
index 655474b..abd4791 100644
@@ -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