diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2020-10-16 13:58:45 +0200 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2020-10-16 13:58:45 +0200 |
commit | f387bb5e777607389d153e209ab7e3bcdbe5a0e8 (patch) | |
tree | 09d5d881a5fcb795bf29bd7bb538c4ccf21e4697 /dvbdevice.c | |
parent | c5461ffd9f5f71b6847165034354347e032d9187 (diff) | |
download | vdr-f387bb5e777607389d153e209ab7e3bcdbe5a0e8.tar.gz vdr-f387bb5e777607389d153e209ab7e3bcdbe5a0e8.tar.bz2 |
Now initializing the status variable in cDvbTuner::GetFrontendStatus() and cDvbTuner::GetSignalStats() to avoid problems with drivers that don't do this2.4.5
Diffstat (limited to 'dvbdevice.c')
-rw-r--r-- | dvbdevice.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/dvbdevice.c b/dvbdevice.c index 93e01d71..a7797203 100644 --- a/dvbdevice.c +++ b/dvbdevice.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: dvbdevice.c 4.26 2020/10/16 13:50:36 kls Exp $ + * $Id: dvbdevice.c 4.27 2020/10/16 13:58:45 kls Exp $ */ #include "dvbdevice.h" @@ -856,6 +856,7 @@ void cDvbTuner::ClearEventQueue(void) const bool cDvbTuner::GetFrontendStatus(fe_status_t &Status) const { ClearEventQueue(); + Status = (fe_status_t)0; // initialize here to fix buggy drivers while (1) { if (ioctl(fd_frontend, FE_READ_STATUS, &Status) != -1) return true; @@ -872,7 +873,7 @@ bool cDvbTuner::GetFrontendStatus(fe_status_t &Status) const bool cDvbTuner::GetSignalStats(int &Valid, double *Strength, double *Cnr, double *BerPre, double *BerPost, double *Per, int *Status) const { ClearEventQueue(); - fe_status_t FeStatus; + fe_status_t FeStatus = (fe_status_t)0; // initialize here to fix buggy drivers dtv_property Props[MAXFRONTENDCMDS]; dtv_properties CmdSeq; memset(&Props, 0, sizeof(Props)); |