Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/kornelski/7z.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'CPP/7zip/Archive/Deb/DebIn.cpp')
-rwxr-xr-xCPP/7zip/Archive/Deb/DebIn.cpp21
1 files changed, 6 insertions, 15 deletions
diff --git a/CPP/7zip/Archive/Deb/DebIn.cpp b/CPP/7zip/Archive/Deb/DebIn.cpp
index c2221d12..41aaeb8a 100755
--- a/CPP/7zip/Archive/Deb/DebIn.cpp
+++ b/CPP/7zip/Archive/Deb/DebIn.cpp
@@ -15,22 +15,12 @@ namespace NDeb {
using namespace NHeader;
-HRESULT CInArchive::ReadBytes(void *data, UInt32 size, UInt32 &processedSize)
-{
- RINOK(ReadStream(m_Stream, data, size, &processedSize));
- m_Position += processedSize;
- return S_OK;
-}
-
HRESULT CInArchive::Open(IInStream *inStream)
{
RINOK(inStream->Seek(0, STREAM_SEEK_CUR, &m_Position));
char signature[kSignatureLen];
- UInt32 processedSize;
- RINOK(ReadStream(inStream, signature, kSignatureLen, &processedSize));
- m_Position += processedSize;
- if (processedSize != kSignatureLen)
- return S_FALSE;
+ RINOK(ReadStream_FALSE(inStream, signature, kSignatureLen));
+ m_Position += kSignatureLen;
if (memcmp(signature, kSignature, kSignatureLen) != 0)
return S_FALSE;
m_Stream = inStream;
@@ -100,10 +90,11 @@ HRESULT CInArchive::GetNextItemReal(bool &filled, CItemEx &item)
char header[NHeader::kHeaderSize];
const char *cur = header;
- UInt32 processedSize;
+ size_t processedSize = sizeof(header);
item.HeaderPosition = m_Position;
- RINOK(ReadBytes(header, sizeof(header), processedSize));
- if (processedSize < sizeof(header))
+ RINOK(ReadStream(m_Stream, header, &processedSize));
+ m_Position += processedSize;
+ if (processedSize != sizeof(header))
return S_OK;
char tempString[kNameSize + 1];