Skip to content

Commit

Permalink
Use error codes that make sense
Browse files Browse the repository at this point in the history
  • Loading branch information
bonsaiviking committed Feb 16, 2018
1 parent a37e8fe commit a8cc4a7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion packetWin7/npf/npf/Loopback.c
Original file line number Diff line number Diff line change
Expand Up @@ -768,7 +768,7 @@ NPF_AddFilter(
"NPF_AddFilter: invalid iFlag, iFlag = %d\n",
iFlag);
TRACE_EXIT();
return status;
return STATUS_INVALID_PARAMETER;
}

filter.numFilterConditions = conditionIndex;
Expand Down
10 changes: 5 additions & 5 deletions packetWin7/npf/npf/Openclos.c
Original file line number Diff line number Diff line change
Expand Up @@ -259,22 +259,22 @@ NPF_OpenAdapter(
DeviceExtension->AdapterName.Buffer,
DeviceExtension->Dot11);

Irp->IoStatus.Status = STATUS_INSUFFICIENT_RESOURCES;
Irp->IoStatus.Status = STATUS_NDIS_INTERFACE_NOT_FOUND;
IoCompleteRequest(Irp, IO_NO_INCREMENT);
TRACE_EXIT();
return STATUS_INSUFFICIENT_RESOURCES;
return STATUS_NDIS_INTERFACE_NOT_FOUND;
}

if (NPF_StartUsingBinding(GroupHead) == FALSE)
{
TRACE_MESSAGE1(PACKET_DEBUG_LOUD,
"NPF_StartUsingOpenInstance error, AdapterName=%ws",
"NPF_StartUsingBinding error, AdapterName=%ws",
DeviceExtension->AdapterName.Buffer);

Irp->IoStatus.Status = STATUS_INSUFFICIENT_RESOURCES;
Irp->IoStatus.Status = STATUS_NDIS_OPEN_FAILED;
IoCompleteRequest(Irp, IO_NO_INCREMENT);
TRACE_EXIT();
return STATUS_INSUFFICIENT_RESOURCES;
return STATUS_NDIS_OPEN_FAILED;
}

// Create a group child adapter object from the head adapter.
Expand Down

0 comments on commit a8cc4a7

Please sign in to comment.