Removed NS_BASE_STREAM_EOF in favor of returning a count of 0 from Read to indicate EOF. Renamed GetLength to Available. Fixed a number of places where AppendElement's broken error code wasn't checked.

git-svn-id: svn://10.0.0.236/trunk@46637 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
warren%netscape.com
1999-09-09 22:05:05 +00:00
parent bf00f6cff0
commit de60d2685c
75 changed files with 181 additions and 187 deletions

View File

@@ -140,7 +140,7 @@ nsPluginInputStream::Read(char* aBuf, PRInt32 aOffset, PRInt32 aCount,
PRUint32 segmentIndex = aOffset - element->offset;
PRUint32 segmentAmount = element->length - segmentIndex;
if (aCount > (PRInt32)segmentAmount) {
return NS_BASE_STREAM_EOF; // XXX right error?
return NS_ERROR_FAILURE;
}
memcpy(aBuf, &element->segment[segmentIndex], aCount);
// mReadCursor = segmentIndex + aCount;