From ccdf9d6833ed2796af319eb834e019ffb460fd0b Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Sat, 23 Sep 2017 23:40:09 +0200 Subject: [PATCH] zapit: properly initialize arrays in scanbat and scansdt Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/8e4907b2db92087c3212c191ec962c4bb0dde91c Author: Stefan Seyfried Date: 2017-09-23 (Sat, 23 Sep 2017) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/zapit/src/scanbat.cpp | 2 +- src/zapit/src/scansdt.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/zapit/src/scanbat.cpp b/src/zapit/src/scanbat.cpp index 49e731568..79e3a1b24 100644 --- a/src/zapit/src/scanbat.cpp +++ b/src/zapit/src/scanbat.cpp @@ -82,7 +82,7 @@ bool CBat::Read() int secdone[255]; int sectotal = -1; - memset(secdone, 0, 255); + memset(secdone, 0, sizeof(secdone)); cDemux * dmx = new cDemux(dmxnum); dmx->Open(DMX_PSI_CHANNEL); diff --git a/src/zapit/src/scansdt.cpp b/src/zapit/src/scansdt.cpp index 5ff2aa358..9114a0eea 100644 --- a/src/zapit/src/scansdt.cpp +++ b/src/zapit/src/scansdt.cpp @@ -68,7 +68,7 @@ bool CSdt::Read() int sectotal = -1; bool cable_hack_done = false; - memset(secdone, 0, 255); + memset(secdone, 0, sizeof(secdone)); cDemux * dmx = new cDemux(dmxnum); dmx->Open(DMX_PSI_CHANNEL);