netfs: Removed 'result' variable
Return B_NO_MEMORY on error creating volumeIDs object in VisitReadQueryRequest() and return nothing on error in ProcessQueryEvent() because the method's return value is void. Change-Id: I23c6f12258a702b6ffff667639e01fdbac928d6d Reviewed-on: https://review.haiku-os.org/c/haiku/+/6371 Reviewed-by: waddlesplash <[email protected]>
This commit is contained in:
@@ -2405,11 +2405,11 @@ ClientConnection::VisitReadQueryRequest(ReadQueryRequest* request)
|
|||||||
|
|
||||||
// create an array for the IDs of the client volumes a found entry may
|
// create an array for the IDs of the client volumes a found entry may
|
||||||
// reside on
|
// reside on
|
||||||
status_t result = B_OK;
|
|
||||||
int32 volumeCount = fVolumes->Size();
|
int32 volumeCount = fVolumes->Size();
|
||||||
int32* volumeIDs = new(std::nothrow) int32[volumeCount];
|
int32* volumeIDs = new(std::nothrow) int32[volumeCount];
|
||||||
if (!volumeIDs)
|
if (!volumeIDs)
|
||||||
result = B_NO_MEMORY;
|
return B_NO_MEMORY;
|
||||||
|
|
||||||
ArrayDeleter<int32> volumeIDsDeleter(volumeIDs);
|
ArrayDeleter<int32> volumeIDsDeleter(volumeIDs);
|
||||||
|
|
||||||
// get the query handle
|
// get the query handle
|
||||||
@@ -2585,11 +2585,11 @@ ClientConnection::ProcessQueryEvent(NodeMonitoringEvent* event)
|
|||||||
|
|
||||||
// create an array for the IDs of the client volumes a found entry may
|
// create an array for the IDs of the client volumes a found entry may
|
||||||
// reside on
|
// reside on
|
||||||
status_t result = B_OK;
|
|
||||||
int32 volumeCount = fVolumes->Size();
|
int32 volumeCount = fVolumes->Size();
|
||||||
int32* volumeIDs = new(std::nothrow) int32[volumeCount];
|
int32* volumeIDs = new(std::nothrow) int32[volumeCount];
|
||||||
if (!volumeIDs)
|
if (!volumeIDs)
|
||||||
result = B_NO_MEMORY;
|
return;
|
||||||
|
|
||||||
ArrayDeleter<int32> volumeIDsDeleter(volumeIDs);
|
ArrayDeleter<int32> volumeIDsDeleter(volumeIDs);
|
||||||
|
|
||||||
HasQueryPermissionClientVolumeFilter filter;
|
HasQueryPermissionClientVolumeFilter filter;
|
||||||
|
|||||||
Reference in New Issue
Block a user