diff mbox

[yavta,4/9] Zero dev in main()

Message ID 1393690690-5004-5-git-send-email-sakari.ailus@iki.fi (mailing list archive)
State New, archived
Headers show

Commit Message

Sakari Ailus March 1, 2014, 4:18 p.m. UTC
This is necessary since video_open() may not be always called soon

Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
---
 yavta.c |    7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
diff mbox

Patch

diff --git a/yavta.c b/yavta.c
index e010252..870682e 100644
--- a/yavta.c
+++ b/yavta.c
@@ -182,11 +182,6 @@  static unsigned int v4l2_format_code(const char *name)
 
 static int video_open(struct device *dev, const char *devname, int no_query)
 {
-	struct v4l2_capability cap;
-	unsigned int capabilities;
-	int ret;
-
-	memset(dev, 0, sizeof *dev);
 	dev->fd = -1;
 	dev->memtype = V4L2_MEMORY_MMAP;
 	dev->buffers = NULL;
@@ -1302,7 +1297,7 @@  static struct option opts[] = {
 int main(int argc, char *argv[])
 {
 	struct sched_param sched;
-	struct device dev;
+	struct device dev = { 0 };
 	int ret;
 
 	/* Options parsings */