diff options
author | Tim-Philipp Müller <tim@centricular.net> | 2007-12-11 11:50:54 +0000 |
---|---|---|
committer | Tim-Philipp Müller <tim@centricular.net> | 2007-12-11 11:50:54 +0000 |
commit | 8d0960ec264312fa2f9cdf1efbc9b0082e9baac7 (patch) | |
tree | 376f7399889a99150868fbe27af1ae52117ae719 /sys/v4l2/v4l2_calls.c | |
parent | dbf28d28e755089fdb13790ca930f1511c17adc0 (diff) |
sys/v4l2/: Init some structs to zero before we pass them to ioctl, which avoids valgrind warnings. Also fix a small ...
Original commit message from CVS:
* sys/v4l2/v4l2_calls.c: (gst_v4l2_fill_lists):
* sys/v4l2/v4l2src_calls.c: (gst_v4l2src_fill_format_list):
Init some structs to zero before we pass them to ioctl, which
avoids valgrind warnings. Also fix a small memory leak.
Diffstat (limited to 'sys/v4l2/v4l2_calls.c')
-rw-r--r-- | sys/v4l2/v4l2_calls.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/v4l2/v4l2_calls.c b/sys/v4l2/v4l2_calls.c index 6233d010..1d005913 100644 --- a/sys/v4l2/v4l2_calls.c +++ b/sys/v4l2/v4l2_calls.c @@ -102,7 +102,7 @@ gst_v4l2_fill_lists (GstV4l2Object * v4l2object) GST_DEBUG_OBJECT (e, " channels"); /* and now, the channels */ for (n = 0;; n++) { - struct v4l2_input input; + struct v4l2_input input = { 0, }; GstV4l2TunerChannel *v4l2channel; GstTunerChannel *channel; @@ -170,7 +170,7 @@ gst_v4l2_fill_lists (GstV4l2Object * v4l2object) GST_DEBUG_OBJECT (e, " norms"); /* norms... */ for (n = 0;; n++) { - struct v4l2_standard standard; + struct v4l2_standard standard = { 0, }; GstV4l2TunerNorm *v4l2norm; GstTunerNorm *norm; @@ -209,7 +209,7 @@ gst_v4l2_fill_lists (GstV4l2Object * v4l2object) GST_DEBUG_OBJECT (e, " controls+menus"); /* and lastly, controls+menus (if appropriate) */ for (n = V4L2_CID_BASE;; n++) { - struct v4l2_queryctrl control; + struct v4l2_queryctrl control = { 0, }; GstV4l2ColorBalanceChannel *v4l2channel; GstColorBalanceChannel *channel; |