V4L/DVB (13287): ce6230 - saa7164-cmd: Fix wrong sizeof
authorJean Delvare <khali@linux-fr.org>
Wed, 4 Nov 2009 18:26:59 +0000 (15:26 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Sat, 7 Nov 2009 14:55:13 +0000 (12:55 -0200)
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>
drivers/media/dvb/dvb-usb/ce6230.c
drivers/media/video/saa7164/saa7164-cmd.c

index 0737c63..3df2045 100644 (file)
@@ -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;
index c45966e..9c1d3ac 100644 (file)
@@ -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;