summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorStefan Kost <ensonic@users.sf.net>2009-06-25 19:39:37 +0300
committerStefan Kost <ensonic@users.sf.net>2009-06-25 19:44:21 +0300
commit5d256c201f82539de9ef7089078b340664ddd9e7 (patch)
tree4ee9152384e4fb1b3daa8d690947717430750f8b /sys
parent5503a59a5779b67451d8a271000181790ee76bc7 (diff)
v4l2src: set structs to zero before using them in ioctls
This fixes valgrind warnings.
Diffstat (limited to 'sys')
-rw-r--r--sys/v4l2/v4l2_calls.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/v4l2/v4l2_calls.c b/sys/v4l2/v4l2_calls.c
index 267c8b17..f8a7d295 100644
--- a/sys/v4l2/v4l2_calls.c
+++ b/sys/v4l2/v4l2_calls.c
@@ -603,7 +603,7 @@ gboolean
gst_v4l2_get_frequency (GstV4l2Object * v4l2object,
gint tunernum, gulong * frequency)
{
- struct v4l2_frequency freq;
+ struct v4l2_frequency freq = { 0, };
GstTunerChannel *channel;
@@ -642,7 +642,7 @@ gboolean
gst_v4l2_set_frequency (GstV4l2Object * v4l2object,
gint tunernum, gulong frequency)
{
- struct v4l2_frequency freq;
+ struct v4l2_frequency freq = { 0, };
GstTunerChannel *channel;
@@ -683,7 +683,7 @@ gboolean
gst_v4l2_signal_strength (GstV4l2Object * v4l2object,
gint tunernum, gulong * signal_strength)
{
- struct v4l2_tuner tuner;
+ struct v4l2_tuner tuner = { 0, };
GST_DEBUG_OBJECT (v4l2object->element, "trying to get signal strength");
@@ -717,7 +717,7 @@ gboolean
gst_v4l2_get_attribute (GstV4l2Object * v4l2object,
int attribute_num, int *value)
{
- struct v4l2_control control;
+ struct v4l2_control control = { 0, };
GST_DEBUG_OBJECT (v4l2object->element, "getting value of attribute %d",
attribute_num);
@@ -754,7 +754,7 @@ gboolean
gst_v4l2_set_attribute (GstV4l2Object * v4l2object,
int attribute_num, const int value)
{
- struct v4l2_control control;
+ struct v4l2_control control = { 0, };
GST_DEBUG_OBJECT (v4l2object->element, "setting value of attribute %d to %d",
attribute_num, value);