Skip to content

Commit

Permalink
V4L/DVB (13287): ce6230 - saa7164-cmd: Fix wrong sizeof
Browse files Browse the repository at this point in the history
Which is why I have always preferred sizeof(struct foo) over
sizeof(var).

Cc: Antti Palosaari <crope@iki.fi>
Acked-by: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Jean Delvare authored and Mauro Carvalho Chehab committed Nov 7, 2009
1 parent d514eda commit 7157fbd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion drivers/media/dvb/dvb-usb/ce6230.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ static int ce6230_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msg[],
int i = 0;
struct req_t req;
int ret = 0;
memset(&req, 0, sizeof(&req));
memset(&req, 0, sizeof(req));

if (num > 2)
return -EINVAL;
Expand Down
2 changes: 1 addition & 1 deletion drivers/media/video/saa7164/saa7164-cmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ int saa7164_cmd_send(struct saa7164_dev *dev, u8 id, tmComResCmd_t command,

/* Prepare some basic command/response structures */
memset(&command_t, 0, sizeof(command_t));
memset(&response_t, 0, sizeof(&response_t));
memset(&response_t, 0, sizeof(response_t));
pcommand_t = &command_t;
presponse_t = &response_t;
command_t.id = id;
Expand Down

0 comments on commit 7157fbd

Please sign in to comment.