Minor tweaks.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3301 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
857609dab7
commit
2a5153718e
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user