From 14397ae2d2b12a63196fc75a08afbb9e4365a70d Mon Sep 17 00:00:00 2001 From: Julian Seward Date: Thu, 28 May 2015 15:02:41 +0200 Subject: [PATCH] Bug 1167581 - Inconsistent pre-zeroing of ioctl buffers in gecko/hal/gonk/GonkFMRadio.cpp. r=mwu. --- hal/gonk/GonkFMRadio.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hal/gonk/GonkFMRadio.cpp b/hal/gonk/GonkFMRadio.cpp index 383e98f4285..a88d544f600 100644 --- a/hal/gonk/GonkFMRadio.cpp +++ b/hal/gonk/GonkFMRadio.cpp @@ -78,7 +78,7 @@ static bool sRDSSupported; static int setControl(uint32_t id, int32_t value) { - struct v4l2_control control; + struct v4l2_control control = {0}; control.id = id; control.value = value; return ioctl(sRadioFD, VIDIOC_S_CTRL, &control); @@ -309,7 +309,7 @@ EnableFMRadio(const hal::FMRadioSettings& aInfo) return; } - struct v4l2_capability cap; + struct v4l2_capability cap = {{0}}; int rc = ioctl(fd, VIDIOC_QUERYCAP, &cap); if (rc < 0) { HAL_LOG("Unable to query radio device"); @@ -487,7 +487,7 @@ GetFMRadioFrequency() if (!sRadioEnabled) return 0; - struct v4l2_frequency freq; + struct v4l2_frequency freq = {0}; int rc = ioctl(sRadioFD, VIDIOC_G_FREQUENCY, &freq); if (rc < 0) { HAL_LOG("Could not get radio frequency");