}
char flags = zlibInflateBuffer[3];
- int gzipHeaderSize = GZIP_HEADER_SIZE;
+ unsigned int gzipHeaderSize = GZIP_HEADER_SIZE;
if (flags & GZIP_HEADER_FEXTRA) {
gzipHeaderSize += 2;
if (zlib.avail_in < gzipHeaderSize) {
f << m_retrievedTime << std::endl;
}
-int Catalog::ageInSeconds() const
+unsigned int Catalog::ageInSeconds() const
{
time_t now;
time(&now);
- return ::difftime(now, m_retrievedTime);
+ int diff = ::difftime(now, m_retrievedTime);
+ return (diff < 0) ? 0 : diff;
}
std::string Catalog::getLocalisedString(const SGPropertyNode* aRoot, const char* aName) const
Package* getPackageById(const std::string& aId) const;
- int ageInSeconds() const;
+ unsigned int ageInSeconds() const;
private:
Catalog(Root* aRoot);
unz_file_info fileInfo;
unzGetCurrentFileInfo(zip, &fileInfo,
buffer, bufferSize,
- NULL, NULL, /* extra field */
- NULL, NULL /* comment field */);
+ NULL, 0, /* extra field */
+ NULL, 0 /* comment field */);
std::string name(buffer);
// no absolute paths, no 'up' traversals