also return B_BAD_VALUE in case NULL pointer passed, please yell if you disagree with this change, but I thought the client code could look less cluttered this way
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14817 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -239,7 +239,7 @@ LinkReceiver::Read(void *data, ssize_t size)
|
||||
if (fReadError < B_OK)
|
||||
return fReadError;
|
||||
|
||||
if (size < 1) {
|
||||
if (data == NULL || size < 1) {
|
||||
fReadError = B_BAD_VALUE;
|
||||
return B_BAD_VALUE;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user