https://git.reactos.org/?p=reactos.git;a=commitdiff;h=52275a92bdf3b0fb3842e…
commit 52275a92bdf3b0fb3842e9c8edcd9f8503673319
Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
AuthorDate: Mon Jan 6 20:35:11 2020 +0100
Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
CommitDate: Sat Mar 19 17:51:44 2022 +0100
[WIN32SS:DISPLAY] Fix some return values (use correct types) in display drivers.
See for example, in DrvEnableSurface(), etc.
TODO: framebufacc's comments need to be "translated" into actual
English...
---
win32ss/drivers/displays/framebuf/ddenable.c | 6 ++---
win32ss/drivers/displays/framebuf/screen.c | 2 +-
win32ss/drivers/displays/framebuf/surface.c | 10 +++----
win32ss/drivers/displays/framebuf_new/enable.c | 32 +++++++++++-----------
win32ss/drivers/displays/framebuf_new/palette.c | 10 +++----
win32ss/drivers/displays/framebuf_new/pointer.c | 8 +++---
win32ss/drivers/displays/framebuf_new/screen.c | 8 +++---
win32ss/drivers/displays/framebufacc/ddenable.c | 6 ++---
win32ss/drivers/displays/framebufacc/pointer.c | 4 +--
win32ss/drivers/displays/framebufacc/screen.c | 2 +-
win32ss/drivers/displays/framebufacc/surface.c | 8 +++---
win32ss/drivers/displays/vga/main/enable.c | 8 +++---
win32ss/drivers/displays/vga/objects/paint.c | 6 ++---
win32ss/drivers/displays/vga/objects/screen.c | 4 +--
win32ss/drivers/displays/vga_new/enable.c | 36 ++++++++++++-------------
win32ss/drivers/displays/vga_new/palette.c | 10 +++----
win32ss/drivers/displays/vga_new/screen.c | 8 +++---
17 files changed, 84 insertions(+), 84 deletions(-)
diff --git a/win32ss/drivers/displays/framebuf/ddenable.c
b/win32ss/drivers/displays/framebuf/ddenable.c
index e2585fc2e2b..a1dcfdbd396 100644
--- a/win32ss/drivers/displays/framebuf/ddenable.c
+++ b/win32ss/drivers/displays/framebuf/ddenable.c
@@ -88,7 +88,7 @@ DrvEnableDirectDraw(
break;
}
- if (pCallBacks !=NULL)
+ if (pCallBacks != NULL)
{
memset(pCallBacks,0,sizeof(DD_CALLBACKS));
@@ -101,7 +101,7 @@ DrvEnableDirectDraw(
pCallBacks->dwFlags = DDHAL_CB32_CANCREATESURFACE |
DDHAL_CB32_CREATESURFACE;
}
- if (pSurfaceCallBacks !=NULL)
+ if (pSurfaceCallBacks != NULL)
{
memset(pSurfaceCallBacks,0,sizeof(DD_SURFACECALLBACKS));
@@ -114,7 +114,7 @@ DrvEnableDirectDraw(
// pSurfaceCallBacks->dwFlags = DDHAL_SURFCB32_DESTROYSURFACE |
DDHAL_SURFCB32_LOCK | DDHAL_SURFCB32_BLT ;
}
- if (pPaletteCallBacks !=NULL)
+ if (pPaletteCallBacks != NULL)
{
memset(pPaletteCallBacks,0,sizeof(DD_PALETTECALLBACKS));
/* FILL pPaletteCallBacks with hal stuff */
diff --git a/win32ss/drivers/displays/framebuf/screen.c
b/win32ss/drivers/displays/framebuf/screen.c
index 7ec7ecff138..b39254b714e 100644
--- a/win32ss/drivers/displays/framebuf/screen.c
+++ b/win32ss/drivers/displays/framebuf/screen.c
@@ -79,7 +79,7 @@ GetAvailableModes(
&ulTemp))
{
EngFreeMem(*ModeInfo);
- *ModeInfo = (PVIDEO_MODE_INFORMATION)NULL;
+ *ModeInfo = NULL;
return 0;
}
diff --git a/win32ss/drivers/displays/framebuf/surface.c
b/win32ss/drivers/displays/framebuf/surface.c
index b0b74da295c..b0a9b4fabb1 100644
--- a/win32ss/drivers/displays/framebuf/surface.c
+++ b/win32ss/drivers/displays/framebuf/surface.c
@@ -50,7 +50,7 @@ DrvEnableSurface(
&(ppdev->ModeIndex), sizeof(ULONG), NULL, 0,
&ulTemp))
{
- return FALSE;
+ return NULL;
}
/*
@@ -63,7 +63,7 @@ DrvEnableSurface(
&VideoMemoryInfo, sizeof(VIDEO_MEMORY_INFORMATION),
&ulTemp))
{
- return FALSE;
+ return NULL;
}
ppdev->ScreenPtr = VideoMemoryInfo.FrameBufferBase;
@@ -88,7 +88,7 @@ DrvEnableSurface(
break;
default:
- return FALSE;
+ return NULL;
}
ppdev->iDitherFormat = BitmapType;
@@ -101,7 +101,7 @@ DrvEnableSurface(
ppdev->ScreenPtr);
if (hSurface == NULL)
{
- return FALSE;
+ return NULL;
}
/*
@@ -111,7 +111,7 @@ DrvEnableSurface(
if (!EngAssociateSurface(hSurface, ppdev->hDevEng, 0))
{
EngDeleteSurface(hSurface);
- return FALSE;
+ return NULL;
}
ppdev->hSurfEng = hSurface;
diff --git a/win32ss/drivers/displays/framebuf_new/enable.c
b/win32ss/drivers/displays/framebuf_new/enable.c
index f22ef24f760..5b668f67288 100644
--- a/win32ss/drivers/displays/framebuf_new/enable.c
+++ b/win32ss/drivers/displays/framebuf_new/enable.c
@@ -70,7 +70,7 @@ PDRVENABLEDATA pded)
pded->iDriverVersion = DDI_DRIVER_VERSION_NT4;
// eVb: 1.2 [END]
- return(TRUE);
+ return TRUE;
}
/******************************Public*Routine******************************\
@@ -97,7 +97,7 @@ HANDLE hDriver) // Handle to base driver
{
GDIINFO GdiInfo;
DEVINFO DevInfo;
- PPDEV ppdev = (PPDEV) NULL;
+ PPDEV ppdev = NULL;
UNREFERENCED_PARAMETER(pwszLogAddress);
UNREFERENCED_PARAMETER(pwszDeviceName);
@@ -106,10 +106,10 @@ HANDLE hDriver) // Handle to base driver
ppdev = (PPDEV) EngAllocMem(0, sizeof(PDEV), ALLOC_TAG);
- if (ppdev == (PPDEV) NULL)
+ if (ppdev == NULL)
{
RIP("DISP DrvEnablePDEV failed EngAllocMem\n");
- return((DHPDEV) 0);
+ return NULL;
}
memset(ppdev, 0, sizeof(PDEV));
@@ -151,12 +151,12 @@ HANDLE hDriver) // Handle to base driver
memcpy(pGdiInfo, &GdiInfo, min(cjGdiInfo, sizeof(GDIINFO)));
- return((DHPDEV) ppdev);
+ return (DHPDEV)ppdev;
// Error case for failure.
error_free:
EngFreeMem(ppdev);
- return((DHPDEV) 0);
+ return NULL;
}
/******************************Public*Routine******************************\
@@ -213,7 +213,7 @@ DHPDEV dhpdev)
if (!bInitSURF(ppdev, TRUE))
{
RIP("DISP DrvEnableSurface failed bInitSURF\n");
- return(FALSE);
+ return NULL;
}
sizl.cx = ppdev->cxScreen;
@@ -223,7 +223,7 @@ DHPDEV dhpdev)
{
if (!bInit256ColorPalette(ppdev)) {
RIP("DISP DrvEnableSurface failed to init the 8bpp palette\n");
- return(FALSE);
+ return NULL;
}
ulBitmapType = BMF_8BPP;
flHooks = HOOKS_BMF8BPP;
@@ -251,10 +251,10 @@ DHPDEV dhpdev)
sizl,
ulBitmapType);
- if (hsurf == (HSURF) 0)
+ if (hsurf == NULL)
{
RIP("DISP DrvEnableSurface failed EngCreateDeviceSurface\n");
- return(FALSE);
+ return NULL;
}
// eVb: 1.4 [END]
@@ -269,12 +269,12 @@ DHPDEV dhpdev)
NULL))
{
RIP("DISP DrvEnableSurface failed EngModifySurface\n");
- return(FALSE);
+ return NULL;
}
// eVb: 1.5 [END]
ppdev->hsurfEng = hsurf;
- return(hsurf);
+ return hsurf;
}
/******************************Public*Routine******************************\
@@ -289,7 +289,7 @@ DHPDEV dhpdev)
{
EngDeleteSurface(((PPDEV) dhpdev)->hsurfEng);
vDisableSURF((PPDEV) dhpdev);
- ((PPDEV) dhpdev)->hsurfEng = (HSURF) 0;
+ ((PPDEV) dhpdev)->hsurfEng = NULL;
}
/******************************Public*Routine******************************\
@@ -318,7 +318,7 @@ BOOL bEnable)
if (!bInitSURF(ppdev, FALSE))
{
DISPDBG((0, "DISP DrvAssertMode failed bInitSURF\n"));
- return (FALSE);
+ return FALSE;
}
if (pjScreen != ppdev->pjScreen) {
@@ -333,11 +333,11 @@ BOOL bEnable)
NULL))
{
DISPDBG((0, "DISP DrvAssertMode failed EngModifySurface\n"));
- return (FALSE);
+ return FALSE;
}
}
// eVb: 1.6 [END]
- return (TRUE);
+ return TRUE;
}
else
{
diff --git a/win32ss/drivers/displays/framebuf_new/palette.c
b/win32ss/drivers/displays/framebuf_new/palette.c
index fbcafef7971..dc16a1576eb 100644
--- a/win32ss/drivers/displays/framebuf_new/palette.c
+++ b/win32ss/drivers/displays/framebuf_new/palette.c
@@ -69,10 +69,10 @@ VOID NTAPI vDisablePalette(PPDEV ppdev)
if (ppdev->hpalDefault)
{
EngDeletePalette(ppdev->hpalDefault);
- ppdev->hpalDefault = (HPALETTE) 0;
+ ppdev->hpalDefault = NULL;
}
- if (ppdev->pPal != (PPALETTEENTRY)NULL)
+ if (ppdev->pPal != NULL)
EngFreeMem((PVOID)ppdev->pPal);
}
@@ -151,7 +151,7 @@ BOOL NTAPI bInitDefaultPalette(PPDEV ppdev, DEVINFO *pDevInfo)
(PULONG) ppdev->pPal,
0,0,0);
- if (ppdev->hpalDefault == (HPALETTE) 0)
+ if (ppdev->hpalDefault == NULL)
{
RIP("DISP bInitDefaultPalette failed EngCreatePalette\n");
EngFreeMem(ppdev->pPal);
@@ -168,12 +168,12 @@ BOOL NTAPI bInitDefaultPalette(PPDEV ppdev, DEVINFO *pDevInfo)
ppdev->hpalDefault =
pDevInfo->hpalDefault = EngCreatePalette(PAL_BITFIELDS,
- 0,(PULONG) NULL,
+ 0, NULL,
ppdev->flRed,
ppdev->flGreen,
ppdev->flBlue);
- if (ppdev->hpalDefault == (HPALETTE) 0)
+ if (ppdev->hpalDefault == NULL)
{
RIP("DISP bInitDefaultPalette failed EngCreatePalette\n");
return(FALSE);
diff --git a/win32ss/drivers/displays/framebuf_new/pointer.c
b/win32ss/drivers/displays/framebuf_new/pointer.c
index a0847ad91d3..862fc8e6ed2 100644
--- a/win32ss/drivers/displays/framebuf_new/pointer.c
+++ b/win32ss/drivers/displays/framebuf_new/pointer.c
@@ -130,7 +130,7 @@ ULONG NTAPI DrvSetPointerShape
// to exclude out pointer before drawing to the pixels in prcl.
UNREFERENCED_PARAMETER(prcl);
- if (ppdev->pPointerAttributes == (PVIDEO_POINTER_ATTRIBUTES) NULL)
+ if (ppdev->pPointerAttributes == NULL)
{
// Mini-port has no hardware Pointer support.
return(SPS_ERROR);
@@ -138,7 +138,7 @@ ULONG NTAPI DrvSetPointerShape
// See if we are being asked to hide the pointer
- if (psoMask == (SURFOBJ *) NULL)
+ if (psoMask == NULL)
{
if (EngDeviceIoControl(ppdev->hDriver,
IOCTL_VIDEO_DISABLE_POINTER,
@@ -215,7 +215,7 @@ FLONG fl)
PVIDEO_POINTER_ATTRIBUTES pPointerAttributes = ppdev->pPointerAttributes;
DWORD returnedDataLength;
- if (psoColor != (SURFOBJ *) NULL)
+ if (psoColor != NULL)
{
if ((ppdev->PointerCapabilities.Flags & VIDEO_MODE_COLOR_POINTER)
&&
bCopyColorPointer(ppdev, psoMask, psoColor, pxlo))
@@ -401,7 +401,7 @@ BOOL NTAPI bInitPointer(PPDEV ppdev, DEVINFO *pdevinfo)
{
DWORD returnedDataLength;
- ppdev->pPointerAttributes = (PVIDEO_POINTER_ATTRIBUTES) NULL;
+ ppdev->pPointerAttributes = NULL;
ppdev->cjPointerAttributes = 0; // initialized in screen.c
//
diff --git a/win32ss/drivers/displays/framebuf_new/screen.c
b/win32ss/drivers/displays/framebuf_new/screen.c
index bcfe8ca4263..66f25faf649 100644
--- a/win32ss/drivers/displays/framebuf_new/screen.c
+++ b/win32ss/drivers/displays/framebuf_new/screen.c
@@ -526,7 +526,7 @@ DWORD *cbModeSize)
&ulTemp))
{
DISPDBG((0, "getAvailableModes failed
VIDEO_QUERY_NUM_AVAIL_MODES\n"));
- return(0);
+ return 0;
}
*cbModeSize = modes.ModeInformationLength;
@@ -539,7 +539,7 @@ DWORD *cbModeSize)
EngAllocMem(0, modes.NumModes *
modes.ModeInformationLength, ALLOC_TAG);
- if (*modeInformation == (PVIDEO_MODE_INFORMATION) NULL)
+ if (*modeInformation == NULL)
{
DISPDBG((0, "getAvailableModes failed EngAllocMem\n"));
@@ -562,9 +562,9 @@ DWORD *cbModeSize)
DISPDBG((0, "getAvailableModes failed VIDEO_QUERY_AVAIL_MODES\n"));
EngFreeMem(*modeInformation);
- *modeInformation = (PVIDEO_MODE_INFORMATION) NULL;
+ *modeInformation = NULL;
- return(0);
+ return 0;
}
//
diff --git a/win32ss/drivers/displays/framebufacc/ddenable.c
b/win32ss/drivers/displays/framebufacc/ddenable.c
index 9b352a2afe3..335fd536c0f 100644
--- a/win32ss/drivers/displays/framebufacc/ddenable.c
+++ b/win32ss/drivers/displays/framebufacc/ddenable.c
@@ -88,7 +88,7 @@ DrvEnableDirectDraw(
break;
}
- if (pCallBacks !=NULL)
+ if (pCallBacks != NULL)
{
memset(pCallBacks,0,sizeof(DD_CALLBACKS));
@@ -101,7 +101,7 @@ DrvEnableDirectDraw(
pCallBacks->dwFlags = DDHAL_CB32_CANCREATESURFACE |
DDHAL_CB32_CREATESURFACE;
}
- if (pSurfaceCallBacks !=NULL)
+ if (pSurfaceCallBacks != NULL)
{
memset(pSurfaceCallBacks,0,sizeof(DD_SURFACECALLBACKS));
@@ -114,7 +114,7 @@ DrvEnableDirectDraw(
// pSurfaceCallBacks->dwFlags = DDHAL_SURFCB32_DESTROYSURFACE |
DDHAL_SURFCB32_LOCK | DDHAL_SURFCB32_BLT ;
}
- if (pPaletteCallBacks !=NULL)
+ if (pPaletteCallBacks != NULL)
{
memset(pPaletteCallBacks,0,sizeof(DD_PALETTECALLBACKS));
/* FILL pPaletteCallBacks with hal stuff */
diff --git a/win32ss/drivers/displays/framebufacc/pointer.c
b/win32ss/drivers/displays/framebufacc/pointer.c
index d4afcf1aed1..92a3c65de47 100644
--- a/win32ss/drivers/displays/framebufacc/pointer.c
+++ b/win32ss/drivers/displays/framebufacc/pointer.c
@@ -102,7 +102,7 @@ DrvSetPointerShape(
}
/* check see if the apps ask to hide the mouse or not */
- if (psoMask == (SURFOBJ *) NULL)
+ if (psoMask == NULL)
{
if (EngDeviceIoControl(ppdev->hDriver, IOCTL_VIDEO_DISABLE_POINTER, NULL, 0,
NULL, 0, &returnedDataLength))
{
@@ -119,7 +119,7 @@ DrvSetPointerShape(
/* Set the hw mouse shape */
- if (psoColor != (SURFOBJ *) NULL)
+ if (psoColor != NULL)
{
/* We got a color mouse pointer */
if ((ppdev->PointerCapabilities.Flags & VIDEO_MODE_COLOR_POINTER)
&&
diff --git a/win32ss/drivers/displays/framebufacc/screen.c
b/win32ss/drivers/displays/framebufacc/screen.c
index 698350d9b08..c6fd6bc872d 100644
--- a/win32ss/drivers/displays/framebufacc/screen.c
+++ b/win32ss/drivers/displays/framebufacc/screen.c
@@ -70,7 +70,7 @@ GetAvailableModes(
&ulTemp))
{
EngFreeMem(*ModeInfo);
- *ModeInfo = (PVIDEO_MODE_INFORMATION)NULL;
+ *ModeInfo = NULL;
return 0;
}
diff --git a/win32ss/drivers/displays/framebufacc/surface.c
b/win32ss/drivers/displays/framebufacc/surface.c
index 2a3182c2a49..920ab3f1ffe 100644
--- a/win32ss/drivers/displays/framebufacc/surface.c
+++ b/win32ss/drivers/displays/framebufacc/surface.c
@@ -152,7 +152,7 @@ DrvEnableSurface(
/* Setup surface and force the mapping */
if (!InitSurface(ppdev, TRUE))
{
- return FALSE;
+ return NULL;
}
/* Rest the desktop vitual position */
@@ -180,7 +180,7 @@ DrvEnableSurface(
break;
default:
- return FALSE;
+ return NULL;
}
ppdev->iDitherFormat = BitmapType;
@@ -193,7 +193,7 @@ DrvEnableSurface(
ppdev->ScreenPtr);
if (hSurface == NULL)
{
- return FALSE;
+ return NULL;
}
/* Which api we hooking to */
@@ -207,7 +207,7 @@ DrvEnableSurface(
if (!EngAssociateSurface(hSurface, ppdev->hDevEng, ppdev->dwHooks))
{
EngDeleteSurface(hSurface);
- return FALSE;
+ return NULL;
}
ppdev->hSurfEng = hSurface;
diff --git a/win32ss/drivers/displays/vga/main/enable.c
b/win32ss/drivers/displays/vga/main/enable.c
index f7223c22a3a..8a644b2280c 100644
--- a/win32ss/drivers/displays/vga/main/enable.c
+++ b/win32ss/drivers/displays/vga/main/enable.c
@@ -375,7 +375,7 @@ DrvDisableSurface(IN DHPDEV PDev)
/* free any pending saved screen bit blocks */
#if 0
pSSB = pdsurf->ssbList;
- while (pSSB != (PSAVED_SCREEN_BITS) NULL)
+ while (pSSB != NULL)
{
/* Point to the next saved screen bits block */
pSSBNext = (PSAVED_SCREEN_BITS) pSSB->pvNextSSB;
@@ -450,7 +450,7 @@ DrvEnableSurface(IN DHPDEV PDev)
/* dhsurf is of type DEVSURF, which is the drivers specialized surface type */
dhsurf = (DHSURF)EngAllocMem(0, sizeof(DEVSURF), ALLOC_TAG);
- if (dhsurf == (DHSURF) 0)
+ if (dhsurf == NULL)
goto error_done;
pdsurf = (PDEVSURF) dhsurf;
@@ -485,7 +485,7 @@ DrvEnableSurface(IN DHPDEV PDev)
} BANKING CODE UNIMPLEMENTED */
if ((hsurf = EngCreateDeviceSurface(dhsurf, ppdev->sizeSurf, BMF_4BPP)) ==
- (HSURF)0)
+ NULL)
{
/* Call to EngCreateDeviceSurface failed */
DPRINT("EngCreateDeviceSurface call failed\n");
@@ -513,7 +513,7 @@ error_clean:
EngFreeMem(dhsurf);
error_done:
- return (HSURF)0;
+ return NULL;
}
diff --git a/win32ss/drivers/displays/vga/objects/paint.c
b/win32ss/drivers/displays/vga/objects/paint.c
index a0204565774..6325ae92a03 100644
--- a/win32ss/drivers/displays/vga/objects/paint.c
+++ b/win32ss/drivers/displays/vga/objects/paint.c
@@ -245,8 +245,8 @@ doBitBlt:
// If VGADDIPaint can't do it, VGADDIBitBlt can.. or it might just loop back
// here and we have a nice infinite loop
- return( VGADDIBitBlt(Surface, (SURFOBJ *)NULL, (SURFOBJ *)NULL, ClipRegion,
- (XLATEOBJ *)NULL, &ClipRegion->rclBounds,
- NULL, (POINTL *)NULL, Brush, BrushOrigin,
+ return( VGADDIBitBlt(Surface, NULL, NULL, ClipRegion,
+ NULL, &ClipRegion->rclBounds,
+ NULL, NULL, Brush, BrushOrigin,
NULL) ); UNIMPLEMENTED */
}
diff --git a/win32ss/drivers/displays/vga/objects/screen.c
b/win32ss/drivers/displays/vga/objects/screen.c
index 51f7c3b38f0..8c11ef0cebe 100644
--- a/win32ss/drivers/displays/vga/objects/screen.c
+++ b/win32ss/drivers/displays/vga/objects/screen.c
@@ -64,7 +64,7 @@ DWORD getAvailableModes(
EngAllocMem(0, modes.NumModes *
modes.ModeInformationLength, ALLOC_TAG);
- if (*modeInformation == (PVIDEO_MODE_INFORMATION) NULL)
+ if (*modeInformation == NULL)
{
/* couldn't allocate buffer */
return 0;
@@ -81,7 +81,7 @@ DWORD getAvailableModes(
{
/* failed to query modes */
EngFreeMem(*modeInformation);
- *modeInformation = (PVIDEO_MODE_INFORMATION) NULL;
+ *modeInformation = NULL;
return 0;
}
diff --git a/win32ss/drivers/displays/vga_new/enable.c
b/win32ss/drivers/displays/vga_new/enable.c
index 08a8d147658..bb941994a64 100644
--- a/win32ss/drivers/displays/vga_new/enable.c
+++ b/win32ss/drivers/displays/vga_new/enable.c
@@ -76,7 +76,7 @@ PDRVENABLEDATA pded)
pded->iDriverVersion = DDI_DRIVER_VERSION_NT4;
// eVb: 1.2 [END]
- return(TRUE);
+ return TRUE;
}
/******************************Public*Routine******************************\
@@ -103,7 +103,7 @@ HANDLE hDriver) // Handle to base driver
{
GDIINFO GdiInfo;
DEVINFO DevInfo;
- PPDEV ppdev = (PPDEV) NULL;
+ PPDEV ppdev = NULL;
UNREFERENCED_PARAMETER(pwszLogAddress);
UNREFERENCED_PARAMETER(pwszDeviceName);
@@ -112,10 +112,10 @@ HANDLE hDriver) // Handle to base driver
ppdev = (PPDEV) EngAllocMem(0, sizeof(PDEV), ALLOC_TAG);
- if (ppdev == (PPDEV) NULL)
+ if (ppdev == NULL)
{
RIP("DISP DrvEnablePDEV failed EngAllocMem\n");
- return((DHPDEV) 0);
+ return NULL;
}
memset(ppdev, 0, sizeof(PDEV));
@@ -161,12 +161,12 @@ HANDLE hDriver) // Handle to base driver
memcpy(pGdiInfo, &GdiInfo, min(cjGdiInfo, sizeof(GDIINFO)));
- return((DHPDEV) ppdev);
+ return (DHPDEV)ppdev;
// Error case for failure.
error_free:
EngFreeMem(ppdev);
- return((DHPDEV) 0);
+ return NULL;
}
/******************************Public*Routine******************************\
@@ -226,7 +226,7 @@ DHPDEV dhpdev)
if (!bInitSURF(ppdev, TRUE))
{
RIP("DISP DrvEnableSurface failed bInitSURF\n");
- return(FALSE);
+ return NULL;
}
sizl.cx = ppdev->cxScreen;
@@ -238,7 +238,7 @@ DHPDEV dhpdev)
{
if (!bInit256ColorPalette(ppdev)) {
RIP("DISP DrvEnableSurface failed to init the 8bpp palette\n");
- return(FALSE);
+ return NULL;
}
ulBitmapType = BMF_8BPP;
flHooks = HOOKS_BMF8BPP;
@@ -266,14 +266,14 @@ DHPDEV dhpdev)
#endif
// eVb: 1.3 [END]
// eVb: 1.4 [DDK Change] - Use EngCreateDeviceSurface instead of EngCreateBitmap
- hsurf = (HSURF)EngCreateDeviceSurface((DHSURF)ppdev,
+ hsurf = (HSURF)EngCreateDeviceSurface((DHSURF)ppdev,
sizl,
ulBitmapType);
- if (hsurf == (HSURF) 0)
+ if (hsurf == NULL)
{
RIP("DISP DrvEnableSurface failed EngCreateDeviceSurface\n");
- return(FALSE);
+ return NULL;
}
// eVb: 1.4 [END]
@@ -288,16 +288,16 @@ DHPDEV dhpdev)
NULL))
{
RIP("DISP DrvEnableSurface failed EngModifySurface\n");
- return(FALSE);
+ return NULL;
}
// eVb: 1.5 [END]
ppdev->hsurfEng = hsurf;
// eVb: 1.4 [VGARISC Change] - Allocate 4BPP DIB that will store GDI drawing
hSurfBitmap = (HSURF)EngCreateBitmap(sizl, 0, ulBitmapType, 0, NULL);
- if (hSurfBitmap == (HSURF) 0)
+ if (hSurfBitmap == NULL)
{
RIP("DISP DrvEnableSurface failed EngCreateBitmap\n");
- return(FALSE);
+ return NULL;
}
if ( !EngModifySurface(hSurfBitmap,
@@ -310,17 +310,17 @@ DHPDEV dhpdev)
NULL))
{
RIP("DISP DrvEnableSurface failed second EngModifySurface\n");
- return(FALSE);
+ return NULL;
}
ppdev->pso = EngLockSurface(hSurfBitmap);
if (ppdev->pso == NULL)
{
RIP("DISP DrvEnableSurface failed EngLockSurface\n");
- return(FALSE);
+ return NULL;
}
// eVb: 1.4 [END]
- return(hsurf);
+ return hsurf;
}
/******************************Public*Routine******************************\
@@ -335,7 +335,7 @@ DHPDEV dhpdev)
{
EngDeleteSurface(((PPDEV) dhpdev)->hsurfEng);
vDisableSURF((PPDEV) dhpdev);
- ((PPDEV) dhpdev)->hsurfEng = (HSURF) 0;
+ ((PPDEV) dhpdev)->hsurfEng = NULL;
}
/******************************Public*Routine******************************\
diff --git a/win32ss/drivers/displays/vga_new/palette.c
b/win32ss/drivers/displays/vga_new/palette.c
index 27499a6d4a8..c2300417fca 100644
--- a/win32ss/drivers/displays/vga_new/palette.c
+++ b/win32ss/drivers/displays/vga_new/palette.c
@@ -86,12 +86,12 @@ VOID vDisablePalette(PPDEV ppdev)
if (ppdev->hpalDefault)
{
EngDeletePalette(ppdev->hpalDefault);
- ppdev->hpalDefault = (HPALETTE) 0;
+ ppdev->hpalDefault = NULL;
}
// eVb: 4.2 [VGARISC Change] - VGA Palette is static, no need to free
#if 0
- if (ppdev->pPal != (PPALETTEENTRY)NULL)
+ if (ppdev->pPal != NULL)
EngFreeMem((PVOID)ppdev->pPal);
#endif
// eVb: 4.2 [END]
@@ -178,7 +178,7 @@ BOOL bInitDefaultPalette(PPDEV ppdev, DEVINFO *pDevInfo)
// eVb: 4.4 [END]
0,0,0);
- if (ppdev->hpalDefault == (HPALETTE) 0)
+ if (ppdev->hpalDefault == NULL)
{
RIP("DISP bInitDefaultPalette failed EngCreatePalette\n");
// eVb: 4.5 [VGARISC Change] - VGA Palette is static, no need to free
@@ -199,12 +199,12 @@ BOOL bInitDefaultPalette(PPDEV ppdev, DEVINFO *pDevInfo)
ppdev->hpalDefault =
pDevInfo->hpalDefault = EngCreatePalette(PAL_BITFIELDS,
- 0,(PULONG) NULL,
+ 0, NULL,
ppdev->flRed,
ppdev->flGreen,
ppdev->flBlue);
- if (ppdev->hpalDefault == (HPALETTE) 0)
+ if (ppdev->hpalDefault == NULL)
{
RIP("DISP bInitDefaultPalette failed EngCreatePalette\n");
return(FALSE);
diff --git a/win32ss/drivers/displays/vga_new/screen.c
b/win32ss/drivers/displays/vga_new/screen.c
index e69317ac427..da66a5cde63 100644
--- a/win32ss/drivers/displays/vga_new/screen.c
+++ b/win32ss/drivers/displays/vga_new/screen.c
@@ -670,7 +670,7 @@ DWORD *cbModeSize)
&ulTemp))
{
DISPDBG((0, "getAvailableModes failed
VIDEO_QUERY_NUM_AVAIL_MODES\n"));
- return(0);
+ return 0;
}
*cbModeSize = modes.ModeInformationLength;
@@ -683,7 +683,7 @@ DWORD *cbModeSize)
EngAllocMem(0, modes.NumModes *
modes.ModeInformationLength, ALLOC_TAG);
- if (*modeInformation == (PVIDEO_MODE_INFORMATION) NULL)
+ if (*modeInformation == NULL)
{
DISPDBG((0, "getAvailableModes failed EngAllocMem\n"));
@@ -706,9 +706,9 @@ DWORD *cbModeSize)
DISPDBG((0, "getAvailableModes failed VIDEO_QUERY_AVAIL_MODES\n"));
EngFreeMem(*modeInformation);
- *modeInformation = (PVIDEO_MODE_INFORMATION) NULL;
+ *modeInformation = NULL;
- return(0);
+ return 0;
}
//