diff options
| author | Andreas Oberritter <obi@opendreambox.org> | 2008-03-25 23:43:08 +0000 |
|---|---|---|
| committer | Andreas Oberritter <obi@opendreambox.org> | 2008-03-25 23:43:08 +0000 |
| commit | ee34a458cc9a6decd919186367324543fc71e509 (patch) | |
| tree | d0a7a4bf887e8ef23129f413e1c5a576e53a4051 /lib/dvb/db.cpp | |
| parent | f36b8b5eeeec483e29b166918a4d719528b27207 (diff) | |
| download | enigma2-ee34a458cc9a6decd919186367324543fc71e509.tar.gz enigma2-ee34a458cc9a6decd919186367324543fc71e509.zip | |
fix: comparison is always false due to limited range of data type
'dest' may be used uninitialized in this function
Diffstat (limited to 'lib/dvb/db.cpp')
| -rw-r--r-- | lib/dvb/db.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/dvb/db.cpp b/lib/dvb/db.cpp index 8f418dac..b40b7373 100644 --- a/lib/dvb/db.cpp +++ b/lib/dvb/db.cpp @@ -417,7 +417,7 @@ void eDVBDB::reloadServicelist() } else while ((!str.empty()) && str[1]==':') // new: p:, f:, c:%02d... { - unsigned int c=str.find(','); + size_t c=str.find(','); char p=str[0]; std::string v; if (c == std::string::npos) @@ -560,7 +560,7 @@ void eDVBDB::loadBouquet(const char *path) eDebug("Bouquet load failed.. no path given.."); return; } - unsigned int pos = bouquet_name.rfind('/'); + size_t pos = bouquet_name.rfind('/'); if ( pos != std::string::npos ) bouquet_name.erase(0, pos+1); if (bouquet_name.empty()) @@ -627,7 +627,7 @@ void eDVBDB::loadBouquet(const char *path) } if ( tmp.flags&eServiceReference::canDescent ) { - unsigned int pos = tmp.path.rfind('/'); + size_t pos = tmp.path.rfind('/'); char buf[256]; std::string path = tmp.path; if ( pos != std::string::npos ) @@ -760,7 +760,7 @@ PyObject *eDVBDB::readSatellites(ePyObject sat_list, ePyObject sat_dict, ePyObje Py_INCREF(Py_False); return Py_False; } - int tmp, *dest, + int tmp, *dest = NULL, modulation, system, freq, sr, pol, fec; char *end_ptr; const Attribute *at; @@ -1335,7 +1335,7 @@ RESULT eDVBDB::getBouquet(const eServiceReference &ref, eBouquet* &bouquet) eDebug("getBouquet failed.. no path given!"); return -1; } - unsigned int pos = str.find("FROM BOUQUET \""); + size_t pos = str.find("FROM BOUQUET \""); if ( pos != std::string::npos ) { str.erase(0, pos+14); |
