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:
mbrumbelow
2023-04-26 21:45:58 +00:00
committed by waddlesplash
parent 8540053c8a
commit 7b3bfaf34f
@@ -2405,11 +2405,11 @@ ClientConnection::VisitReadQueryRequest(ReadQueryRequest* request)
// create an array for the IDs of the client volumes a found entry may
// reside on
status_t result = B_OK;
int32 volumeCount = fVolumes->Size();
int32* volumeIDs = new(std::nothrow) int32[volumeCount];
if (!volumeIDs)
result = B_NO_MEMORY;
return B_NO_MEMORY;
ArrayDeleter<int32> volumeIDsDeleter(volumeIDs);
// 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
// reside on
status_t result = B_OK;
int32 volumeCount = fVolumes->Size();
int32* volumeIDs = new(std::nothrow) int32[volumeCount];
if (!volumeIDs)
result = B_NO_MEMORY;
return;
ArrayDeleter<int32> volumeIDsDeleter(volumeIDs);
HasQueryPermissionClientVolumeFilter filter;