CID 26: The status variable was shadowed inside the while loop causing the outer
status to always be B_OK, resulting in an incomplete buffer instead of an error if the append failed. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27469 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -323,7 +323,7 @@ BufferQueue::Get(size_t bytes, bool remove, net_buffer **_buffer)
|
||||
status_t status = B_OK;
|
||||
while (bytesLeft > 0 && (source = iterator.Next()) != NULL) {
|
||||
size_t size = min_c(source->size, bytesLeft);
|
||||
status_t status = gBufferModule->append_cloned(buffer, source, 0, size);
|
||||
status = gBufferModule->append_cloned(buffer, source, 0, size);
|
||||
if (status < B_OK)
|
||||
break;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user