Skip to contentSkip to conversation

Fix wrong sizeof

PATCH In review Jean Delvare 2 participants 2 messages Oct 2, 2009 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix wrong sizeof

Which is why I have always preferred sizeof(struct foo) over sizeof(var).

---
 linux/drivers/media/dvb/dvb-usb/ce6230.c        |    2 +-
 linux/drivers/media/video/saa7164/saa7164-cmd.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
linux/drivers/media/dvb/dvb-usb/ce6230.c +1 -1
@@ -105,7 +105,7 @@ static int ce6230_i2c_xfer(struct i2c_ad
 	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;
linux/drivers/media/video/saa7164/saa7164-cmd.c +1 -1
@@ -347,7 +347,7 @@ int saa7164_cmd_send(struct saa7164_dev
 
 	/* 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;
Signature · 1 line
Jean Delvare