PIDeque fix ssize_t
fix uninitialized variables fix PIDeque prepend with std::initializer_list
This commit is contained in:
@@ -563,6 +563,8 @@ void PIBinaryLog::parseLog(PIFile * f, PIBinaryLog::BinLogInfo * info, PIVector<
|
||||
if (!ok) return;
|
||||
PIByteArray ba;
|
||||
BinLogRecord br;
|
||||
br.id = 0;
|
||||
br.size = 0;
|
||||
bool first = true;
|
||||
size_t hdr_size = sizeof(BinLogRecord) - sizeof(PIByteArray);
|
||||
ba.resize(hdr_size);
|
||||
@@ -571,12 +573,9 @@ void PIBinaryLog::parseLog(PIFile * f, PIBinaryLog::BinLogInfo * info, PIVector<
|
||||
{
|
||||
if (f->read(ba.data(), ba.size()) > 0) {
|
||||
ba >> br.id >> br.size >> br.timestamp;
|
||||
} else
|
||||
break;
|
||||
if (info->log_size - f->pos() >= br.size)
|
||||
f->seek(f->pos() + br.size);
|
||||
else
|
||||
break;
|
||||
} else break;
|
||||
if (info->log_size - f->pos() >= br.size) f->seek(f->pos() + br.size);
|
||||
else break;
|
||||
}
|
||||
if (br.id > 0) {
|
||||
if (info) {
|
||||
|
||||
Reference in New Issue
Block a user