https://git.reactos.org/?p=reactos.git;a=commitdiff;h=fb023adf5a7b8761776e5…
commit fb023adf5a7b8761776e5a1e0813da6454ed9ca4
Author: Serge Gautherie <reactos-git_serge_171003(a)gautherie.fr>
AuthorDate: Mon Jun 8 22:45:45 2020 +0200
Commit: Thomas Faber <thomas.faber(a)reactos.org>
CommitDate: Thu Jun 18 10:31:27 2020 +0200
[VIDEOPRT] IntVideoPortCreateAdapterDeviceObject(): 1+1 trivial fixes
Detected by Cppcheck: funcArgOrderDifferent, redundantAssignment.
---
win32ss/drivers/videoprt/videoprt.c | 9 ++++-----
win32ss/drivers/videoprt/videoprt.h | 8 ++++----
2 files changed, 8 insertions(+), 9 deletions(-)
diff --git a/win32ss/drivers/videoprt/videoprt.c b/win32ss/drivers/videoprt/videoprt.c
index d040652b4ec..a59d0442017 100644
--- a/win32ss/drivers/videoprt/videoprt.c
+++ b/win32ss/drivers/videoprt/videoprt.c
@@ -90,10 +90,10 @@ IntVideoPortDeferredRoutine(
NTSTATUS
NTAPI
IntVideoPortCreateAdapterDeviceObject(
- IN PDRIVER_OBJECT DriverObject,
- IN PVIDEO_PORT_DRIVER_EXTENSION DriverExtension,
- IN PDEVICE_OBJECT PhysicalDeviceObject,
- OUT PDEVICE_OBJECT *DeviceObject OPTIONAL)
+ _In_ PDRIVER_OBJECT DriverObject,
+ _In_ PVIDEO_PORT_DRIVER_EXTENSION DriverExtension,
+ _In_opt_ PDEVICE_OBJECT PhysicalDeviceObject,
+ _Out_opt_ PDEVICE_OBJECT *DeviceObject)
{
PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension;
ULONG DeviceNumber;
@@ -1046,7 +1046,6 @@ VideoPortScanRom(
StringLength = strlen((PCHAR)String);
Found = FALSE;
- SearchLocation = RomBase;
for (SearchLocation = RomBase;
!Found && SearchLocation < RomBase + RomLength - StringLength;
SearchLocation++)
diff --git a/win32ss/drivers/videoprt/videoprt.h b/win32ss/drivers/videoprt/videoprt.h
index 8035278e349..7c559def846 100644
--- a/win32ss/drivers/videoprt/videoprt.h
+++ b/win32ss/drivers/videoprt/videoprt.h
@@ -257,10 +257,10 @@ IntDetachFromCSRSS(PKPROCESS *CallingProcess, PKAPC_STATE
ApcState);
NTSTATUS NTAPI
IntVideoPortCreateAdapterDeviceObject(
- IN PDRIVER_OBJECT DriverObject,
- IN PVIDEO_PORT_DRIVER_EXTENSION DriverExtension,
- IN PDEVICE_OBJECT PhysicalDeviceObject OPTIONAL,
- OUT PDEVICE_OBJECT *DeviceObject OPTIONAL);
+ _In_ PDRIVER_OBJECT DriverObject,
+ _In_ PVIDEO_PORT_DRIVER_EXTENSION DriverExtension,
+ _In_opt_ PDEVICE_OBJECT PhysicalDeviceObject,
+ _Out_opt_ PDEVICE_OBJECT *DeviceObject);
NTSTATUS NTAPI
IntVideoPortFindAdapter(