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:
Stephan Aßmus
2005-11-10 12:00:10 +00:00
parent 04cd47db59
commit 97078ce5e6
+1 -1
View File
@@ -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;
}