Minor tweaks.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3301 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
ejakowatz 2003-05-23 23:55:32 +00:00
parent 857609dab7
commit 2a5153718e

View File

@ -193,7 +193,7 @@ BMemoryIO::~BMemoryIO()
ssize_t ssize_t
BMemoryIO::ReadAt(off_t pos, void *buffer, size_t size) BMemoryIO::ReadAt(off_t pos, void *buffer, size_t size)
{ {
if (buffer == NULL) if (buffer == NULL || pos < 0)
return B_BAD_VALUE; return B_BAD_VALUE;
ssize_t sizeRead = 0; ssize_t sizeRead = 0;
@ -212,7 +212,7 @@ BMemoryIO::WriteAt(off_t pos, const void *buffer, size_t size)
if (fReadOnly) if (fReadOnly)
return B_NOT_ALLOWED; return B_NOT_ALLOWED;
if (buffer == NULL) if (buffer == NULL || pos < 0)
return B_BAD_VALUE; return B_BAD_VALUE;
ssize_t sizeWritten = 0; ssize_t sizeWritten = 0;