From ebe3c529b10224b7dfae83001a1fa9a416b0af97 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Thu, 9 Dec 2004 14:07:59 +0000 Subject: [PATCH] Janitorial: C booleans must not be compared against TRUE. --- dlls/avifil32/avifile.c | 2 +- dlls/comctl32/datetime.c | 2 +- dlls/comctl32/tab.c | 4 +-- dlls/commdlg/printdlg.c | 4 +-- dlls/d3d8/device.c | 10 +++--- dlls/d3d8/drawprim.c | 28 ++++++++-------- dlls/d3d8/utils.c | 2 +- dlls/d3d8/vshaderdeclaration.c | 4 +-- dlls/ddraw/d3ddevice/mesa.c | 56 +++++++++++++++---------------- dlls/ddraw/d3dtexture.c | 4 +-- dlls/ddraw/d3dvertexbuffer.c | 2 +- dlls/ddraw/dsurface/fakezbuffer.c | 2 +- dlls/ddraw/mesa.c | 8 ++--- dlls/dmime/performance.c | 8 ++--- dlls/dmloader/classfactory.c | 4 +-- dlls/dmloader/loader.c | 2 +- dlls/dsound/sound3d.c | 2 +- dlls/itss/chm_lib.c | 2 +- dlls/kernel/tests/locale.c | 2 +- dlls/msvcrt/lock.c | 2 +- dlls/ole32/compositemoniker.c | 2 +- dlls/ole32/storage32.c | 2 +- dlls/quartz/systemclock.c | 2 +- dlls/serialui/confdlg.c | 2 +- dlls/shell32/shellole.c | 2 +- dlls/user/menu.c | 2 +- dlls/winaspi/winaspi16.c | 5 ++- dlls/wined3d/device.c | 4 +-- dlls/wined3d/directx.c | 4 +-- dlls/wined3d/drawprim.c | 4 +-- dlls/wineps/glyphlist.c | 2 +- dlls/winmm/mciwave/mciwave.c | 2 +- programs/regedit/framewnd.c | 2 +- programs/uninstaller/main.c | 2 +- windows/winproc.c | 3 +- 35 files changed, 94 insertions(+), 96 deletions(-) diff --git a/dlls/avifil32/avifile.c b/dlls/avifil32/avifile.c index 03de45bb7b2..4e4103f5510 100644 --- a/dlls/avifil32/avifile.c +++ b/dlls/avifil32/avifile.c @@ -1999,7 +1999,7 @@ static HRESULT AVIFILE_ParseIndex(IAVIFileImpl *This, AVIINDEXENTRY *lp, if (nStream > This->fInfo.dwStreams) return AVIERR_BADFORMAT; - if (*bAbsolute == TRUE && lp->dwChunkOffset < This->dwMoviChunkPos) + if (*bAbsolute && lp->dwChunkOffset < This->dwMoviChunkPos) *bAbsolute = FALSE; if (*bAbsolute) diff --git a/dlls/comctl32/datetime.c b/dlls/comctl32/datetime.c index 5f695016570..4793b6cf55f 100644 --- a/dlls/comctl32/datetime.c +++ b/dlls/comctl32/datetime.c @@ -620,7 +620,7 @@ DATETIME_LButtonDown (DATETIME_INFO *infoPtr, WORD wKey, INT x, INT y) static LRESULT DATETIME_LButtonUp (DATETIME_INFO *infoPtr, WORD wKey) { - if(infoPtr->bCalDepressed == TRUE) { + if(infoPtr->bCalDepressed) { infoPtr->bCalDepressed = FALSE; InvalidateRect(infoPtr->hwndSelf, &(infoPtr->calbutton), TRUE); } diff --git a/dlls/comctl32/tab.c b/dlls/comctl32/tab.c index efdf955db6f..46224adf50c 100644 --- a/dlls/comctl32/tab.c +++ b/dlls/comctl32/tab.c @@ -258,7 +258,7 @@ TAB_SetCurFocus (HWND hwnd,WPARAM wParam) if (infoPtr->iSelected != iItem || infoPtr->uFocus == -1 ) { infoPtr->uFocus = iItem; if (oldFocus != -1) { - if (TAB_SendSimpleNotify(hwnd, TCN_SELCHANGING)!=TRUE) { + if (!TAB_SendSimpleNotify(hwnd, TCN_SELCHANGING)) { infoPtr->iSelected = iItem; TAB_SendSimpleNotify(hwnd, TCN_SELCHANGE); } @@ -611,7 +611,7 @@ TAB_LButtonDown (HWND hwnd, WPARAM wParam, LPARAM lParam) if ((newItem != -1) && (infoPtr->iSelected != newItem)) { - if (TAB_SendSimpleNotify(hwnd, TCN_SELCHANGING) != TRUE) + if (!TAB_SendSimpleNotify(hwnd, TCN_SELCHANGING)) { infoPtr->iSelected = newItem; infoPtr->uFocus = newItem; diff --git a/dlls/commdlg/printdlg.c b/dlls/commdlg/printdlg.c index 2554d887b05..2737b0221ef 100644 --- a/dlls/commdlg/printdlg.c +++ b/dlls/commdlg/printdlg.c @@ -1412,7 +1412,7 @@ LRESULT PRINTDLG_WMCommandA(HWND hDlg, WPARAM wParam, switch (LOWORD(wParam)) { case IDOK: TRACE(" OK button was hit\n"); - if (PRINTDLG_UpdatePrintDlgA(hDlg, PrintStructures)!=TRUE) { + if (!PRINTDLG_UpdatePrintDlgA(hDlg, PrintStructures)) { FIXME("Update printdlg was not successful!\n"); return(FALSE); } @@ -1589,7 +1589,7 @@ static LRESULT PRINTDLG_WMCommandW(HWND hDlg, WPARAM wParam, switch (LOWORD(wParam)) { case IDOK: TRACE(" OK button was hit\n"); - if (PRINTDLG_UpdatePrintDlgW(hDlg, PrintStructures)!=TRUE) { + if (!PRINTDLG_UpdatePrintDlgW(hDlg, PrintStructures)) { FIXME("Update printdlg was not successful!\n"); return(FALSE); } diff --git a/dlls/d3d8/device.c b/dlls/d3d8/device.c index 2010a09d293..246c8d6da4d 100644 --- a/dlls/d3d8/device.c +++ b/dlls/d3d8/device.c @@ -1966,7 +1966,7 @@ HRESULT WINAPI IDirect3DDevice8Impl_LightEnable(LPDIRECT3DDEVICE8 iface, DWORD /* If we are disabling it, check it was enabled, and still only do something if it has assigned a glIndex (which it should have!) */ - if ((lightInfo->lightEnabled == TRUE) && (lightInfo->glIndex != -1)) { + if (lightInfo->lightEnabled && (lightInfo->glIndex != -1)) { TRACE("Disabling light set up at gl idx %ld\n", lightInfo->glIndex); ENTER_GL(); glDisable(GL_LIGHT0 + lightInfo->glIndex); @@ -1979,7 +1979,7 @@ HRESULT WINAPI IDirect3DDevice8Impl_LightEnable(LPDIRECT3DDEVICE8 iface, DWORD } else { /* We are enabling it. If it is enabled, its really simple */ - if (lightInfo->lightEnabled == TRUE) { + if (lightInfo->lightEnabled) { /* nop */ TRACE("Nothing to do as light was enabled\n"); @@ -3216,7 +3216,7 @@ HRESULT WINAPI IDirect3DDevice8Impl_SetTexture(LPDIRECT3DDEVICE8 iface, DWORD textureType = IDirect3DBaseTexture8Impl_GetType(pTexture); if (textureType == D3DRTYPE_TEXTURE) { - if (oldTxt == pTexture && TRUE == IDirect3DBaseTexture8Impl_IsDirty(pTexture)) { + if (oldTxt == pTexture && IDirect3DBaseTexture8Impl_IsDirty(pTexture)) { TRACE("Skipping setting texture as old == new\n"); reapplyStates = FALSE; } else { @@ -3228,7 +3228,7 @@ HRESULT WINAPI IDirect3DDevice8Impl_SetTexture(LPDIRECT3DDEVICE8 iface, DWORD IDirect3DTexture8Impl_PreLoad((LPDIRECT3DTEXTURE8) pTexture); } } else if (textureType == D3DRTYPE_VOLUMETEXTURE) { - if (oldTxt == pTexture && TRUE == IDirect3DBaseTexture8Impl_IsDirty(pTexture)) { + if (oldTxt == pTexture && IDirect3DBaseTexture8Impl_IsDirty(pTexture)) { TRACE("Skipping setting texture as old == new\n"); reapplyStates = FALSE; } else { @@ -3240,7 +3240,7 @@ HRESULT WINAPI IDirect3DDevice8Impl_SetTexture(LPDIRECT3DDEVICE8 iface, DWORD IDirect3DVolumeTexture8Impl_PreLoad((LPDIRECT3DVOLUMETEXTURE8) pTexture); } } else if (textureType == D3DRTYPE_CUBETEXTURE) { - if (oldTxt == pTexture && TRUE == IDirect3DBaseTexture8Impl_IsDirty(pTexture)) { + if (oldTxt == pTexture && IDirect3DBaseTexture8Impl_IsDirty(pTexture)) { TRACE("Skipping setting texture as old == new\n"); reapplyStates = FALSE; } else { diff --git a/dlls/d3d8/drawprim.c b/dlls/d3d8/drawprim.c index c18eb9c885b..afb4c917ebb 100644 --- a/dlls/d3d8/drawprim.c +++ b/dlls/d3d8/drawprim.c @@ -167,7 +167,7 @@ void init_materials(LPDIRECT3DDEVICE8 iface, BOOL isDiffuseSupplied) { BOOL requires_material_reset = FALSE; IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface; - if (This->tracking_color == NEEDS_TRACKING && isDiffuseSupplied == TRUE) { + if (This->tracking_color == NEEDS_TRACKING && isDiffuseSupplied) { /* If we have not set up the material color tracking, do it now as required */ glDisable(GL_COLOR_MATERIAL); /* Note: Man pages state must enable AFTER calling glColorMaterial! Required?*/ checkGLcall("glDisable GL_COLOR_MATERIAL"); @@ -187,7 +187,7 @@ void init_materials(LPDIRECT3DDEVICE8 iface, BOOL isDiffuseSupplied) { This->tracking_color = NEEDS_TRACKING; requires_material_reset = TRUE; /* Restore material settings as will be used */ - } else if (This->tracking_color == IS_TRACKING && isDiffuseSupplied == TRUE) { + } else if (This->tracking_color == IS_TRACKING && isDiffuseSupplied) { /* No need to reset material colors since no change to gl_color_material */ requires_material_reset = FALSE; @@ -199,7 +199,7 @@ void init_materials(LPDIRECT3DDEVICE8 iface, BOOL isDiffuseSupplied) { } /* Reset the material colors which may have been tracking the color*/ - if (requires_material_reset == TRUE) { + if (requires_material_reset) { glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT, (float*) &This->StateBlock->material.Ambient); checkGLcall("glMaterialfv"); glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, (float*) &This->StateBlock->material.Diffuse); @@ -393,7 +393,7 @@ void primitiveConvertToStridedData(LPDIRECT3DDEVICE8 iface, Direct3DVertexStride if (LoopThroughTo == 1) { /* VertexShader is FVF */ thisFVF = This->UpdateStateBlock->VertexShader; /* Handle memory passed directly as well as vertex buffers */ - if (This->StateBlock->streamIsUP == TRUE) { + if (This->StateBlock->streamIsUP) { data = (BYTE *)This->StateBlock->stream_source[nStream]; } else { data = ((IDirect3DVertexBuffer8Impl *)This->StateBlock->stream_source[nStream])->allocatedMemory; @@ -526,13 +526,13 @@ void draw_vertex(LPDIRECT3DDEVICE8 iface, /* interf IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface; /* Diffuse -------------------------------- */ - if (isDiffuse == TRUE) { + if (isDiffuse) { glColor4fv(dRGBA); VTRACE(("glColor4f: r,g,b,a=%f,%f,%f,%f\n", dRGBA[0], dRGBA[1], dRGBA[2], dRGBA[3])); } /* Specular Colour ------------------------------------------*/ - if (isSpecular == TRUE) { + if (isSpecular) { if (GL_SUPPORT(EXT_SECONDARY_COLOR)) { GL_EXTCALL(glSecondaryColor3fvEXT(sRGB)); VTRACE(("glSecondaryColor4f: r,g,b=%f,%f,%f\n", sRGB[0], sRGB[1], sRGB[2])); @@ -542,13 +542,13 @@ void draw_vertex(LPDIRECT3DDEVICE8 iface, /* interf } /* Normal -------------------------------- */ - if (isNormal == TRUE) { + if (isNormal) { VTRACE(("glNormal:nx,ny,nz=%f,%f,%f\n", nx,ny,nz)); glNormal3f(nx, ny, nz); } /* Point Size ----------------------------------------------*/ - if (isPtSize == TRUE) { + if (isPtSize) { /* no such functionality in the fixed function GL pipeline */ FIXME("Cannot change ptSize here in openGl\n"); @@ -644,7 +644,7 @@ void draw_vertex(LPDIRECT3DDEVICE8 iface, /* interf } /* End of textures */ /* Position -------------------------------- */ - if (isXYZ == TRUE) { + if (isXYZ) { if (1.0f == rhw || rhw < 0.00001f) { VTRACE(("Vertex: glVertex:x,y,z=%f,%f,%f\n", x,y,z)); glVertex3f(x, y, z); @@ -1475,7 +1475,7 @@ void drawPrimitive(LPDIRECT3DDEVICE8 iface, if (rc) return; /* If we will be using a vertex shader, do some initialization for it */ - if (useVertexShaderFunction == TRUE) { + if (useVertexShaderFunction) { vertex_shader = VERTEX_SHADER(This->UpdateStateBlock->VertexShader); memset(&vertex_shader->input, 0, sizeof(VSHADERINPUTDATA8)); @@ -1485,7 +1485,7 @@ void drawPrimitive(LPDIRECT3DDEVICE8 iface, vertex_shader->usage != D3DUSAGE_SOFTWAREPROCESSING); /** init Constants */ - if (TRUE == This->UpdateStateBlock->Changed.vertexShaderConstant) { + if (This->UpdateStateBlock->Changed.vertexShaderConstant) { TRACE_(d3d_shader)("vertex shader initializing constants\n"); IDirect3DVertexShaderImpl_SetConstantF(vertex_shader, 0, (CONST FLOAT*) &This->UpdateStateBlock->vertexShaderConstant[0], 96); } @@ -1505,7 +1505,7 @@ void drawPrimitive(LPDIRECT3DDEVICE8 iface, checkGLcall("glEnable(GL_FRAGMENT_PROGRAM_ARB);"); /* init Constants */ - if (TRUE == This->UpdateStateBlock->Changed.pixelShaderConstant) { + if (This->UpdateStateBlock->Changed.pixelShaderConstant) { TRACE_(d3d_shader)("pixel shader initializing constants %p\n",pixel_shader); IDirect3DPixelShaderImpl_SetConstantF(pixel_shader, 0, (CONST FLOAT*) &This->UpdateStateBlock->pixelShaderConstant[0], 8); } @@ -1571,7 +1571,7 @@ void drawPrimitive(LPDIRECT3DDEVICE8 iface, } /* Now draw the graphics to the screen */ - if (useVertexShaderFunction == TRUE) { + if (useVertexShaderFunction) { /* Ideally, we should have software FV and hardware VS, possibly depending on the device type? */ @@ -1632,7 +1632,7 @@ void drawPrimitive(LPDIRECT3DDEVICE8 iface, /* Diagnostics */ #if defined(SHOW_FRAME_MAKEUP) { - if (isDumpingFrames == TRUE) { + if (isDumpingFrames) { D3DLOCKED_RECT r; char buffer[80]; IDirect3DSurface8Impl_LockRect((LPDIRECT3DSURFACE8) This->renderTarget, &r, NULL, D3DLOCK_READONLY); diff --git a/dlls/d3d8/utils.c b/dlls/d3d8/utils.c index 74861ab320f..92f854bd100 100644 --- a/dlls/d3d8/utils.c +++ b/dlls/d3d8/utils.c @@ -1822,7 +1822,7 @@ void set_tex_op(LPDIRECT3DDEVICE8 iface, BOOL isAlpha, int Stage, D3DTEXTUREOP o } } - if (combineOK == TRUE) { + if (combineOK) { glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, useext(GL_COMBINE)); checkGLcall("GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, useext(GL_COMBINE)"); diff --git a/dlls/d3d8/vshaderdeclaration.c b/dlls/d3d8/vshaderdeclaration.c index d93068c4a35..7f9c1121fca 100644 --- a/dlls/d3d8/vshaderdeclaration.c +++ b/dlls/d3d8/vshaderdeclaration.c @@ -418,7 +418,7 @@ HRESULT WINAPI IDirect3DDeviceImpl_FillVertexShaderInputSW(IDirect3DDevice8Impl* ERR("using unitialised stream[%lu]\n", stream); return D3DERR_INVALIDCALL; } else { - if (This->StateBlock->streamIsUP == TRUE) { + if (This->StateBlock->streamIsUP) { curPos = ((char *) pVB) + (SkipnStrides * skip); /* Not really a VB */ } else { curPos = ((IDirect3DVertexBuffer8Impl*) pVB)->allocatedMemory + (SkipnStrides * skip); @@ -602,7 +602,7 @@ HRESULT WINAPI IDirect3DDeviceImpl_FillVertexShaderInputArbHW(IDirect3DDevice8Im ERR("using unitialised stream[%lu]\n", stream); return D3DERR_INVALIDCALL; } else { - if (This->StateBlock->streamIsUP == TRUE) { + if (This->StateBlock->streamIsUP) { curPos = ((char *) pVB) + (SkipnStrides * skip); /* Not really a VB */ } else { curPos = ((IDirect3DVertexBuffer8Impl*) pVB)->allocatedMemory + (SkipnStrides * skip); diff --git a/dlls/ddraw/d3ddevice/mesa.c b/dlls/ddraw/d3ddevice/mesa.c index d9890e4071a..bfaada8a792 100644 --- a/dlls/ddraw/d3ddevice/mesa.c +++ b/dlls/ddraw/d3ddevice/mesa.c @@ -926,7 +926,7 @@ static void draw_primitive_handle_GL_state(IDirect3DDeviceImpl *This, This->world_mat, This->view_mat, This->proj_mat); glThis->transform_state = GL_TRANSFORM_NORMAL; - } else if ((vertex_transformed == TRUE) && + } else if (vertex_transformed && (glThis->transform_state != GL_TRANSFORM_ORTHO)) { /* Set our orthographic projection */ if (glThis->transform_state != GL_TRANSFORM_ORTHO) { @@ -937,8 +937,8 @@ static void draw_primitive_handle_GL_state(IDirect3DDeviceImpl *This, /* TODO: optimize this to not always reset all the fog stuff on all DrawPrimitive call if no fogging state change occurred */ - if (This->state_block.render_state[D3DRENDERSTATE_FOGENABLE - 1] == TRUE) { - if (vertex_transformed == TRUE) { + if (This->state_block.render_state[D3DRENDERSTATE_FOGENABLE - 1]) { + if (vertex_transformed) { if (glThis->fogging != 0) { glDisable(GL_FOG); glThis->fogging = 0; @@ -985,7 +985,7 @@ static void draw_primitive_handle_GL_state(IDirect3DDeviceImpl *This, } /* Handle the 'no-normal' case */ - if ((vertex_lit == FALSE) && (This->state_block.render_state[D3DRENDERSTATE_LIGHTING - 1] == TRUE)) { + if ((vertex_lit == FALSE) && This->state_block.render_state[D3DRENDERSTATE_LIGHTING - 1]) { if (glThis->lighting == 0) { glEnable(GL_LIGHTING); glThis->lighting = 1; @@ -999,8 +999,8 @@ static void draw_primitive_handle_GL_state(IDirect3DDeviceImpl *This, /* Handle the code for pre-vertex material properties */ if (vertex_transformed == FALSE) { - if ((This->state_block.render_state[D3DRENDERSTATE_LIGHTING - 1] == TRUE) && - (This->state_block.render_state[D3DRENDERSTATE_COLORVERTEX - 1] == TRUE)) { + if (This->state_block.render_state[D3DRENDERSTATE_LIGHTING - 1] && + This->state_block.render_state[D3DRENDERSTATE_COLORVERTEX - 1]) { if ((This->state_block.render_state[D3DRENDERSTATE_DIFFUSEMATERIALSOURCE - 1] != D3DMCS_MATERIAL) || (This->state_block.render_state[D3DRENDERSTATE_AMBIENTMATERIALSOURCE - 1] != D3DMCS_MATERIAL) || (This->state_block.render_state[D3DRENDERSTATE_EMISSIVEMATERIALSOURCE - 1] != D3DMCS_MATERIAL) || @@ -1125,7 +1125,7 @@ static void flush_zbuffer_to_GL(IDirect3DDeviceImpl *d3d_dev, LPCRECT pRect, IDi unsigned int row; GLenum type; - if (first == TRUE) { + if (first) { MESSAGE("Warning : application does direct locking of ZBuffer - expect slowdowns on many GL implementations :-)\n"); first = FALSE; } @@ -1188,8 +1188,8 @@ inline static void handle_normal(D3DVALUE *coords) { } inline static void handle_diffuse_base(STATEBLOCK *sb, DWORD *color) { - if ((sb->render_state[D3DRENDERSTATE_ALPHATESTENABLE - 1] == TRUE) || - (sb->render_state[D3DRENDERSTATE_ALPHABLENDENABLE - 1] == TRUE)) { + if (sb->render_state[D3DRENDERSTATE_ALPHATESTENABLE - 1] || + sb->render_state[D3DRENDERSTATE_ALPHABLENDENABLE - 1]) { glColor4ub((*color >> 16) & 0xFF, (*color >> 8) & 0xFF, (*color >> 0) & 0xFF, @@ -1210,8 +1210,8 @@ inline static void handle_specular_base(STATEBLOCK *sb, DWORD *color) { inline static void handle_diffuse(STATEBLOCK *sb, DWORD *color, BOOLEAN lighted) { if ((lighted == FALSE) && - (sb->render_state[D3DRENDERSTATE_LIGHTING - 1] == TRUE) && - (sb->render_state[D3DRENDERSTATE_COLORVERTEX - 1] == TRUE)) { + sb->render_state[D3DRENDERSTATE_LIGHTING - 1] && + sb->render_state[D3DRENDERSTATE_COLORVERTEX - 1]) { if (sb->render_state[D3DRENDERSTATE_DIFFUSEMATERIALSOURCE - 1] == D3DMCS_COLOR1) { glColorMaterial(GL_FRONT_AND_BACK, GL_DIFFUSE); handle_diffuse_base(sb, color); @@ -1221,7 +1221,7 @@ inline static void handle_diffuse(STATEBLOCK *sb, DWORD *color, BOOLEAN lighted) handle_diffuse_base(sb, color); } if ((sb->render_state[D3DRENDERSTATE_SPECULARMATERIALSOURCE - 1] == D3DMCS_COLOR1) && - (sb->render_state[D3DRENDERSTATE_SPECULARENABLE - 1] == TRUE)) { + sb->render_state[D3DRENDERSTATE_SPECULARENABLE - 1]) { glColorMaterial(GL_FRONT_AND_BACK, GL_SPECULAR); handle_diffuse_base(sb, color); } @@ -1236,8 +1236,8 @@ inline static void handle_diffuse(STATEBLOCK *sb, DWORD *color, BOOLEAN lighted) inline static void handle_specular(STATEBLOCK *sb, DWORD *color, BOOLEAN lighted) { if ((lighted == FALSE) && - (sb->render_state[D3DRENDERSTATE_LIGHTING - 1] == TRUE) && - (sb->render_state[D3DRENDERSTATE_COLORVERTEX - 1] == TRUE)) { + sb->render_state[D3DRENDERSTATE_LIGHTING - 1] && + sb->render_state[D3DRENDERSTATE_COLORVERTEX - 1]) { if (sb->render_state[D3DRENDERSTATE_DIFFUSEMATERIALSOURCE - 1] == D3DMCS_COLOR2) { glColorMaterial(GL_FRONT_AND_BACK, GL_DIFFUSE); handle_specular_base(sb, color); @@ -1247,7 +1247,7 @@ inline static void handle_specular(STATEBLOCK *sb, DWORD *color, BOOLEAN lighted handle_specular_base(sb, color); } if ((sb->render_state[D3DRENDERSTATE_SPECULARMATERIALSOURCE - 1] == D3DMCS_COLOR2) && - (sb->render_state[D3DRENDERSTATE_SPECULARENABLE - 1] == TRUE)) { + sb->render_state[D3DRENDERSTATE_SPECULARENABLE - 1]) { glColorMaterial(GL_FRONT_AND_BACK, GL_SPECULAR); handle_specular_base(sb, color); } @@ -1260,9 +1260,9 @@ inline static void handle_specular(STATEBLOCK *sb, DWORD *color, BOOLEAN lighted } inline static void handle_diffuse_and_specular(STATEBLOCK *sb, BYTE *fog_table, DWORD *color_d, DWORD *color_s, BOOLEAN lighted) { - if (lighted == TRUE) { + if (lighted) { DWORD color = *color_d; - if (sb->render_state[D3DRENDERSTATE_FOGENABLE - 1] == TRUE) { + if (sb->render_state[D3DRENDERSTATE_FOGENABLE - 1]) { /* Special case where the specular value is used to do fogging */ BYTE fog_intensity = *color_s >> 24; /* The alpha value of the specular component is the fog 'intensity' for this vertex */ color &= 0xFF000000; /* Only keep the alpha component */ @@ -1270,12 +1270,12 @@ inline static void handle_diffuse_and_specular(STATEBLOCK *sb, BYTE *fog_table, color |= fog_table[((*color_d >> 8) & 0xFF) << 8 | fog_intensity] << 8; color |= fog_table[((*color_d >> 16) & 0xFF) << 8 | fog_intensity] << 16; } - if (sb->render_state[D3DRENDERSTATE_SPECULARENABLE - 1] == TRUE) { + if (sb->render_state[D3DRENDERSTATE_SPECULARENABLE - 1]) { /* Standard specular value in transformed mode. TODO */ } handle_diffuse_base(sb, &color); } else { - if (sb->render_state[D3DRENDERSTATE_LIGHTING - 1] == TRUE) { + if (sb->render_state[D3DRENDERSTATE_LIGHTING - 1]) { handle_diffuse(sb, color_d, FALSE); handle_specular(sb, color_s, FALSE); } else { @@ -1698,7 +1698,7 @@ GL_IDirect3DDeviceImpl_7_3T_DrawPrimitiveVB(LPDIRECT3DDEVICE7 iface, TRACE(" - flags : "); dump_DPFLAGS(dwFlags); } - if (vb_impl->processed == TRUE) { + if (vb_impl->processed) { IDirect3DVertexBufferGLImpl *vb_glimp = (IDirect3DVertexBufferGLImpl *) vb_impl; IDirect3DDeviceGLImpl *glThis = (IDirect3DDeviceGLImpl *) This; @@ -1736,7 +1736,7 @@ GL_IDirect3DDeviceImpl_7_3T_DrawIndexedPrimitiveVB(LPDIRECT3DDEVICE7 iface, TRACE(" - flags : "); dump_DPFLAGS(dwFlags); } - if (vb_impl->processed == TRUE) { + if (vb_impl->processed) { IDirect3DVertexBufferGLImpl *vb_glimp = (IDirect3DVertexBufferGLImpl *) vb_impl; IDirect3DDeviceGLImpl *glThis = (IDirect3DDeviceGLImpl *) This; @@ -1939,7 +1939,7 @@ GL_IDirect3DDeviceImpl_7_3T_SetTextureStageState(LPDIRECT3DDEVICE7 iface, case D3DTADDRESS_CLAMP: TRACE(" Stage type is : %s => D3DTADDRESS_CLAMP\n", type); break; case D3DTADDRESS_BORDER: TRACE(" Stage type is : %s => D3DTADDRESS_BORDER\n", type); break; case D3DTADDRESS_MIRROR: - if (GL_extensions.mirrored_repeat == TRUE) { + if (GL_extensions.mirrored_repeat) { TRACE(" Stage type is : %s => D3DTADDRESS_MIRROR\n", type); } else { FIXME(" Stage type is : %s => D3DTADDRESS_MIRROR - not supported by GL !\n", type); @@ -2209,7 +2209,7 @@ GL_IDirect3DDeviceImpl_7_3T_SetTextureStageState(LPDIRECT3DDEVICE7 iface, This->matrices_updated(This, TEXMAT0_CHANGED << dwStage); } - if (handled == TRUE) { + if (handled) { TRACE(" Stage type : D3DTSS_TEXTURETRANSFORMFLAGS => %s%s\n", value, projected); } else { FIXME(" Unhandled stage type : D3DTSS_TEXTURETRANSFORMFLAGS => %s%s\n", value, projected); @@ -2319,7 +2319,7 @@ draw_primitive_handle_textures(IDirect3DDeviceImpl *This) glThis->alpha_test = TRUE; } if ((glThis->current_alpha_test_func != GL_NOTEQUAL) || (glThis->current_alpha_test_ref != 0.0)) { - if (This->state_block.render_state[D3DRENDERSTATE_ALPHATESTENABLE - 1] == TRUE) { + if (This->state_block.render_state[D3DRENDERSTATE_ALPHATESTENABLE - 1]) { static BOOL warn = FALSE; if (warn == FALSE) { warn = TRUE; @@ -3591,7 +3591,7 @@ static void d3ddevice_lock_update(IDirectDrawSurfaceImpl* This, LPCRECT pRect, D /* Try to acquire the device critical section */ EnterCriticalSection(&(d3d_dev->crit)); - if (gl_d3d_dev->lock_rect_valid[buffer_type] == TRUE) { + if (gl_d3d_dev->lock_rect_valid[buffer_type]) { ERR("Two consecutive locks on %s buffer... Expect problems !\n", (buffer_type == WINE_GL_BUFFER_BACK ? "back" : "front")); } @@ -3866,7 +3866,7 @@ apply_texture_state(IDirect3DDeviceImpl *This) /* Initialize texture stages states */ for (stage = 0; stage < MAX_TEXTURES; stage++) { for (state = 0; state < HIGHEST_TEXTURE_STAGE_STATE; state += 1) { - if (This->state_block.set_flags.texture_stage_state[stage][state] == TRUE) { + if (This->state_block.set_flags.texture_stage_state[stage][state]) { IDirect3DDevice7_SetTextureStageState(ICOM_INTERFACE(This, IDirect3DDevice7), stage, state + 1, This->state_block.texture_stage_state[stage][state]); } @@ -4085,7 +4085,7 @@ static void fill_opengl_primcaps(D3DPRIMCAPS *pc) pc->dwRasterCaps = D3DPRASTERCAPS_DITHER | D3DPRASTERCAPS_FOGRANGE | D3DPRASTERCAPS_FOGTABLE | D3DPRASTERCAPS_FOGVERTEX | D3DPRASTERCAPS_STIPPLE | D3DPRASTERCAPS_ZBIAS | D3DPRASTERCAPS_ZTEST | D3DPRASTERCAPS_SUBPIXEL | D3DPRASTERCAPS_ZFOG; - if (GL_extensions.mipmap_lodbias == TRUE) { + if (GL_extensions.mipmap_lodbias) { pc->dwRasterCaps |= D3DPRASTERCAPS_MIPMAPLODBIAS; } pc->dwZCmpCaps = D3DPCMPCAPS_ALWAYS | D3DPCMPCAPS_EQUAL | D3DPCMPCAPS_GREATER | D3DPCMPCAPS_GREATEREQUAL | @@ -4109,7 +4109,7 @@ static void fill_opengl_primcaps(D3DPRIMCAPS *pc) pc->dwTextureBlendCaps = D3DPTBLENDCAPS_ADD | D3DPTBLENDCAPS_COPY | D3DPTBLENDCAPS_DECAL | D3DPTBLENDCAPS_DECALALPHA | D3DPTBLENDCAPS_DECALMASK | D3DPTBLENDCAPS_MODULATE | D3DPTBLENDCAPS_MODULATEALPHA | D3DPTBLENDCAPS_MODULATEMASK; pc->dwTextureAddressCaps = D3DPTADDRESSCAPS_BORDER | D3DPTADDRESSCAPS_CLAMP | D3DPTADDRESSCAPS_WRAP | D3DPTADDRESSCAPS_INDEPENDENTUV; - if (GL_extensions.mirrored_repeat == TRUE) { + if (GL_extensions.mirrored_repeat) { pc->dwTextureAddressCaps |= D3DPTADDRESSCAPS_MIRROR; } pc->dwStippleWidth = 32; diff --git a/dlls/ddraw/d3dtexture.c b/dlls/ddraw/d3dtexture.c index ad433670b1e..862bcb0e60e 100644 --- a/dlls/ddraw/d3dtexture.c +++ b/dlls/ddraw/d3dtexture.c @@ -147,7 +147,7 @@ convert_tex_address_to_GL(D3DTEXTUREADDRESS dwState) case D3DTADDRESS_CLAMP: gl_state = GL_CLAMP; break; case D3DTADDRESS_BORDER: gl_state = GL_CLAMP_TO_EDGE; break; case D3DTADDRESS_MIRROR: - if (GL_extensions.mirrored_repeat == TRUE) { + if (GL_extensions.mirrored_repeat) { gl_state = GL_MIRRORED_REPEAT_WINE; } else { gl_state = GL_REPEAT; @@ -266,7 +266,7 @@ gltex_upload_texture(IDirectDrawSurfaceImpl *surf_ptr, IDirect3DDeviceImpl *d3dd changed = TRUE; } - if (changed == TRUE) { + if (changed) { if (gl_surf_ptr->tex_parameters == NULL) { gl_surf_ptr->tex_parameters = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(DWORD) * (D3DTSS_MAXMIPLEVEL + 1 - D3DTSS_ADDRESSU)); diff --git a/dlls/ddraw/d3dvertexbuffer.c b/dlls/ddraw/d3dvertexbuffer.c index 1fad63e8821..ca8d7321014 100644 --- a/dlls/ddraw/d3dvertexbuffer.c +++ b/dlls/ddraw/d3dvertexbuffer.c @@ -104,7 +104,7 @@ Main_IDirect3DVertexBufferImpl_7_1T_Lock(LPDIRECT3DVERTEXBUFFER7 iface, DDRAW_dump_lockflag(dwFlags); } - if (This->processed == TRUE) { + if (This->processed) { WARN(" application does a Lock on a vertex buffer resulting from a ProcessVertices call. Expect problems !\n"); } diff --git a/dlls/ddraw/dsurface/fakezbuffer.c b/dlls/ddraw/dsurface/fakezbuffer.c index bd772afcde6..e2cfdd9b209 100644 --- a/dlls/ddraw/dsurface/fakezbuffer.c +++ b/dlls/ddraw/dsurface/fakezbuffer.c @@ -61,7 +61,7 @@ static void zbuffer_unlock_update(IDirectDrawSurfaceImpl* This, LPCRECT pRect) static BOOLEAN zbuffer_get_dirty_status(IDirectDrawSurfaceImpl* This, LPCRECT pRect) { - if (((FakeZBuffer_DirectDrawSurfaceImpl *) This->private)->in_memory == TRUE) { + if (((FakeZBuffer_DirectDrawSurfaceImpl *) This->private)->in_memory) { ((FakeZBuffer_DirectDrawSurfaceImpl *) This->private)->in_memory = FALSE; return TRUE; } diff --git a/dlls/ddraw/mesa.c b/dlls/ddraw/mesa.c index 55b568f6c2e..f4f5e3324ae 100644 --- a/dlls/ddraw/mesa.c +++ b/dlls/ddraw/mesa.c @@ -162,7 +162,7 @@ void set_render_state(IDirect3DDeviceImpl* This, glThis->depth_test = TRUE; } } else if (dwRenderState == D3DZB_FALSE) { - if (glThis->depth_test == TRUE) { + if (glThis->depth_test) { glDisable(GL_DEPTH_TEST); glThis->depth_test = FALSE; } @@ -883,7 +883,7 @@ HRESULT upload_surface_to_tex_memory_init(IDirectDrawSurfaceImpl *surf_ptr, GLui if ((src_pf->u2.dwRBitMask == 0x00FF0000) && (src_pf->u3.dwGBitMask == 0x0000FF00) && (src_pf->u4.dwBBitMask == 0x000000FF)) { - if (need_alpha_ck == TRUE) { + if (need_alpha_ck) { convert_type = CONVERT_RGB32_888; current_format = GL_RGBA; internal_format = GL_RGBA; @@ -905,7 +905,7 @@ HRESULT upload_surface_to_tex_memory_init(IDirectDrawSurfaceImpl *surf_ptr, GLui error = TRUE; } - if (error == TRUE) { + if (error) { ERR("Unsupported pixel format for textures : \n"); if (ERR_ON(ddraw)) { DDRAW_dump_pixelformat(src_pf); @@ -921,7 +921,7 @@ HRESULT upload_surface_to_tex_memory_init(IDirectDrawSurfaceImpl *surf_ptr, GLui } } - if ((sub_texture == TRUE) && (convert_type == NO_CONVERSION)) { + if (sub_texture && (convert_type == NO_CONVERSION)) { current_storage_width = surf_ptr->surface_desc.u1.lPitch / bpp; } else { if (surf_ptr->surface_desc.u1.lPitch == (surf_ptr->surface_desc.dwWidth * bpp)) { diff --git a/dlls/dmime/performance.c b/dlls/dmime/performance.c index 2a7bbc274cd..2252718b97f 100644 --- a/dlls/dmime/performance.c +++ b/dlls/dmime/performance.c @@ -114,7 +114,7 @@ static DWORD WINAPI ProcessMsgThread(LPVOID lpParam) { outrefresh: LeaveCriticalSection(&This->safe); - while (TRUE == PeekMessageA(&msg, NULL, 0, 0, PM_REMOVE)) { + while (PeekMessageA(&msg, NULL, 0, 0, PM_REMOVE)) { /** if hwnd we suppose that is a windows event ... */ if (NULL != msg.hwnd) { TranslateMessage(&msg); @@ -308,7 +308,7 @@ HRESULT WINAPI IDirectMusicPerformance8Impl_SendPMsg (LPDIRECTMUSICPERFORMANCE8 if (NULL == pItem) { return E_POINTER; } - if (TRUE == pItem->bInUse) { + if (pItem->bInUse) { return DMUS_E_ALREADY_SENT; } @@ -369,7 +369,7 @@ HRESULT WINAPI IDirectMusicPerformance8Impl_GetTime (LPDIRECTMUSICPERFORMANCE8 i REFERENCE_TIME rtCur = 0; /*TRACE("(%p, %p, %p)\n", This, prtNow, pmtNow); */ - if (TRUE == This->procThreadTicStarted) { + if (This->procThreadTicStarted) { rtCur = ((REFERENCE_TIME) GetTickCount() * 10000) - This->procThreadStartTime; } else { /*return DMUS_E_NO_MASTER_CLOCK;*/ @@ -417,7 +417,7 @@ HRESULT WINAPI IDirectMusicPerformance8Impl_FreePMsg (LPDIRECTMUSICPERFORMANCE8 if (NULL == pItem) { return E_POINTER; } - if (TRUE == pItem->bInUse) { + if (pItem->bInUse) { /** prevent for freeing PMsg in queue (ie to be processed) */ return DMUS_E_CANNOT_FREE; } diff --git a/dlls/dmloader/classfactory.c b/dlls/dmloader/classfactory.c index 8d718b9d027..976a481ce36 100644 --- a/dlls/dmloader/classfactory.c +++ b/dlls/dmloader/classfactory.c @@ -75,7 +75,7 @@ HRESULT WINAPI IDirectMusicLoaderCF_CreateInstance (LPCLASSFACTORY iface, LPUNKN HRESULT WINAPI IDirectMusicLoaderCF_LockServer (LPCLASSFACTORY iface, BOOL dolock) { IDirectMusicLoaderCF *This = (IDirectMusicLoaderCF *)iface; TRACE("(%p, %d)\n", This, dolock); - if (dolock == TRUE) + if (dolock) InterlockedIncrement (&dwDirectMusicLoader); else InterlockedDecrement (&dwDirectMusicLoader); @@ -162,7 +162,7 @@ HRESULT WINAPI IDirectMusicContainerCF_CreateInstance (LPCLASSFACTORY iface, LPU HRESULT WINAPI IDirectMusicContainerCF_LockServer (LPCLASSFACTORY iface, BOOL dolock) { IDirectMusicContainerCF *This = (IDirectMusicContainerCF *)iface; TRACE("(%p, %d)\n", This, dolock); - if (dolock == TRUE) + if (dolock) InterlockedIncrement (&dwDirectMusicContainer); else InterlockedDecrement (&dwDirectMusicContainer); diff --git a/dlls/dmloader/loader.c b/dlls/dmloader/loader.c index 8bee1099ffc..35b986da64c 100644 --- a/dlls/dmloader/loader.c +++ b/dlls/dmloader/loader.c @@ -93,7 +93,7 @@ HRESULT WINAPI IDirectMusicLoaderImpl_IDirectMusicLoader_GetObject (LPDIRECTMUSI IsEqualGUID (&pDesc->guidObject, &pExistingEntry->Desc.guidObject)) { TRACE(": found it by object GUID\n"); /* I suppose such stuff can happen only when GUID for object is given (GUID_DefaultGMCollection) */ - if (pExistingEntry->bInvalidDefaultDLS == TRUE) { + if (pExistingEntry->bInvalidDefaultDLS) { TRACE(": found faulty default DLS collection... enabling M$ compliant behaviour\n"); return DMUS_E_LOADER_NOFILENAME; } diff --git a/dlls/dsound/sound3d.c b/dlls/dsound/sound3d.c index 86b44bc7ffe..6b9632893e3 100644 --- a/dlls/dsound/sound3d.c +++ b/dlls/dsound/sound3d.c @@ -355,7 +355,7 @@ static void WINAPI DSOUND_ChangeListener(IDirectSound3DListenerImpl *ds3dl) crash without the following line) */ if (ds3dl->dsound->buffers[i]->ds3db == NULL) continue; - if (ds3dl->dsound->buffers[i]->ds3db_need_recalc == TRUE) + if (ds3dl->dsound->buffers[i]->ds3db_need_recalc) { DSOUND_Mix3DBuffer(ds3dl->dsound->buffers[i]); } diff --git a/dlls/itss/chm_lib.c b/dlls/itss/chm_lib.c index 7020153ac39..206924ab1c7 100644 --- a/dlls/itss/chm_lib.c +++ b/dlls/itss/chm_lib.c @@ -588,7 +588,7 @@ static Int64 _chm_fetch_bytes(struct chmFile *h, buf, (DWORD)len, &actualLen, - NULL) == TRUE) + NULL)) readLen = actualLen; else readLen = 0; diff --git a/dlls/kernel/tests/locale.c b/dlls/kernel/tests/locale.c index 1acbe301044..2259672ebd1 100644 --- a/dlls/kernel/tests/locale.c +++ b/dlls/kernel/tests/locale.c @@ -131,7 +131,7 @@ char GlobalBuffer[BUFFER_SIZE]; /* Buffer used by callback function */ #define EXPECT_LENW EXPECT_LEN((int)strlenW(Expected)+1) #define EXPECT_EQW ok(strncmpW(buffer, Expected, strlenW(Expected)) == 0, "Bad conversion\n") #define EXPECT_FALSE ok(FALSE == ret, "Expected return value FALSE, got TRUE\n") -#define EXPECT_TRUE ok(TRUE == ret, "Expected return value TRUE, got FALSE\n") +#define EXPECT_TRUE ok(FALSE != ret, "Expected return value TRUE, got FALSE\n") #define NUO LOCALE_NOUSEROVERRIDE diff --git a/dlls/msvcrt/lock.c b/dlls/msvcrt/lock.c index e9c5dfbf848..3c60f26453d 100644 --- a/dlls/msvcrt/lock.c +++ b/dlls/msvcrt/lock.c @@ -90,7 +90,7 @@ void msvcrt_free_mt_locks(void) /* Uninitialize the table */ for( i=0; i < _TOTAL_LOCKS; i++ ) { - if( lock_table[ i ].bInit == TRUE ) + if( lock_table[ i ].bInit ) { msvcrt_uninitialize_mlock( i ); } diff --git a/dlls/ole32/compositemoniker.c b/dlls/ole32/compositemoniker.c index 9d7fa0c08b0..66d39267ca7 100644 --- a/dlls/ole32/compositemoniker.c +++ b/dlls/ole32/compositemoniker.c @@ -445,7 +445,7 @@ HRESULT WINAPI CompositeMonikerImpl_GetSizeMax(IMoniker* iface,ULARGE_INTEGER* p IMoniker_Enum(iface,TRUE,&enumMk); - while(IEnumMoniker_Next(enumMk,1,&pmk,NULL)==TRUE){ + while(IEnumMoniker_Next(enumMk,1,&pmk,NULL)){ IMoniker_GetSizeMax(pmk,&ptmpSize); diff --git a/dlls/ole32/storage32.c b/dlls/ole32/storage32.c index 6dcdeda8246..21d2e51b5ae 100644 --- a/dlls/ole32/storage32.c +++ b/dlls/ole32/storage32.c @@ -1680,7 +1680,7 @@ HRESULT WINAPI StorageImpl_DestroyElement( This->rootPropertySetIndex, &parentProperty); - assert(res==TRUE); + assert(res); /* * Second, check to see if by any chance the actual storage (This) is not diff --git a/dlls/quartz/systemclock.c b/dlls/quartz/systemclock.c index 7279658ec32..83535eb3731 100644 --- a/dlls/quartz/systemclock.c +++ b/dlls/quartz/systemclock.c @@ -139,7 +139,7 @@ static DWORD WINAPI SystemClockAdviseThread(LPVOID lpParam) { outrefresh: LeaveCriticalSection(&This->safe); - while (TRUE == PeekMessageA(&msg, NULL, 0, 0, PM_REMOVE)) { + while (PeekMessageA(&msg, NULL, 0, 0, PM_REMOVE)) { /** if hwnd we suppose that is a windows event ... */ if (NULL != msg.hwnd) { TranslateMessage(&msg); diff --git a/dlls/serialui/confdlg.c b/dlls/serialui/confdlg.c index f16dce684a8..dc4be4ffdf1 100644 --- a/dlls/serialui/confdlg.c +++ b/dlls/serialui/confdlg.c @@ -263,7 +263,7 @@ static void SERIALUI_DCBToDialogInfo(HWND hDlg, SERIALUI_DialogInfo *info) /* map flow control state, if it looks normal */ if((lpdcb->fRtsControl == RTS_CONTROL_HANDSHAKE) || - (lpdcb->fOutxCtsFlow == TRUE)) { + (lpdcb->fOutxCtsFlow)) { dwFlowControl = 1; } else if(lpdcb->fOutX || lpdcb->fInX) { dwFlowControl = 2; diff --git a/dlls/shell32/shellole.c b/dlls/shell32/shellole.c index 94769d356a7..0167b16dc2f 100644 --- a/dlls/shell32/shellole.c +++ b/dlls/shell32/shellole.c @@ -704,7 +704,7 @@ UINT WINAPI DragQueryFileA( lpDrop = (LPSTR) lpDropFileStruct + lpDropFileStruct->pFiles; - if(lpDropFileStruct->fWide == TRUE) { + if(lpDropFileStruct->fWide) { LPWSTR lpszFileW = NULL; if(lpszFile) { diff --git a/dlls/user/menu.c b/dlls/user/menu.c index 385b01d781f..0b2888df1d7 100644 --- a/dlls/user/menu.c +++ b/dlls/user/menu.c @@ -2186,7 +2186,7 @@ static INT MENU_ButtonUp( MTRACKER* pmt, HMENU hPtMenu, UINT wFlags) /* If we are dealing with the top-level menu */ /* and this is a click on an already "popped" item: */ /* Stop the menu tracking and close the opened submenus */ - if((pmt->hTopMenu == hPtMenu) && (ptmenu->bTimeToHide == TRUE)) + if((pmt->hTopMenu == hPtMenu) && ptmenu->bTimeToHide) return 0; } ptmenu->bTimeToHide = TRUE; diff --git a/dlls/winaspi/winaspi16.c b/dlls/winaspi/winaspi16.c index bf17eb58eb2..3a4f182746b 100644 --- a/dlls/winaspi/winaspi16.c +++ b/dlls/winaspi/winaspi16.c @@ -455,7 +455,7 @@ WORD WINAPI SendASPICommand16(SEGPTR segptr_srb) WORD WINAPI InsertInASPIChain16(BOOL16 remove, FARPROC16 pASPIChainFunc) { #ifdef linux - if (remove == TRUE) /* Remove */ + if (remove) /* Remove */ { if (ASPIChainFunc == pASPIChainFunc) { @@ -463,8 +463,7 @@ WORD WINAPI InsertInASPIChain16(BOOL16 remove, FARPROC16 pASPIChainFunc) return SS_COMP; } } - else - if (remove == FALSE) /* Insert */ + else /* Insert */ { if (ASPIChainFunc == NULL) { diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 4bf30b49b69..1ddc6576ad2 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -704,7 +704,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_SetLightEnable(IWineD3DDevice *iface, DWORD In /* If we are disabling it, check it was enabled, and still only do something if it has assigned a glIndex (which it should have!) */ - if ((lightInfo->lightEnabled == TRUE) && (lightInfo->glIndex != -1)) { + if ((lightInfo->lightEnabled) && (lightInfo->glIndex != -1)) { TRACE("Disabling light set up at gl idx %ld\n", lightInfo->glIndex); ENTER_GL(); glDisable(GL_LIGHT0 + lightInfo->glIndex); @@ -717,7 +717,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_SetLightEnable(IWineD3DDevice *iface, DWORD In } else { /* We are enabling it. If it is enabled, its really simple */ - if (lightInfo->lightEnabled == TRUE) { + if (lightInfo->lightEnabled) { /* nop */ TRACE("Nothing to do as light was enabled\n"); diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c index 39c95c893c3..a2fa0935e6b 100644 --- a/dlls/wined3d/directx.c +++ b/dlls/wined3d/directx.c @@ -763,7 +763,7 @@ HRESULT WINAPI IWineD3DImpl_GetAdapterIdentifier(IWineD3D *iface, UINT Adapter, } /* If it worked, return the information requested */ - if (isGLInfoValid == TRUE) { + if (isGLInfoValid) { TRACE_(d3d_caps)("device/Vendor Name and Version detection using FillGLCaps\n"); strcpy(pIdentifier->Driver, "Display"); strcpy(pIdentifier->Description, "Direct3D HAL"); @@ -1029,7 +1029,7 @@ HRESULT WINAPI IWineD3DImpl_GetDeviceCaps(IWineD3D *iface, UINT Adapter, D3DDEVT BOOL rc = IWineD3DImpl_FillGLCaps(&This->gl_info, NULL); /* If we are running off a real context, save the values */ - if ((rc == TRUE) && ((NULL != fake_ctx))) This->isGLInfoValid = TRUE; + if (rc && ((NULL != fake_ctx))) This->isGLInfoValid = TRUE; } /* ------------------------------------------------ diff --git a/dlls/wined3d/drawprim.c b/dlls/wined3d/drawprim.c index 082c37935fb..7a23b45d3b7 100644 --- a/dlls/wined3d/drawprim.c +++ b/dlls/wined3d/drawprim.c @@ -1506,7 +1506,7 @@ void drawPrimitive(IWineD3DDevice *iface, vertex_shader->usage != D3DUSAGE_SOFTWAREPROCESSING); /** init Constants */ - if (TRUE == This->updateStateBlock->Changed.vertexShaderConstant) { + if (This->updateStateBlock->Changed.vertexShaderConstant) { TRACE_(d3d_shader)("vertex shader initializing constants\n"); IDirect3DVertexShaderImpl_SetConstantF(vertex_shader, 0, (CONST FLOAT*) &This->updateStateBlock->vertexShaderConstant[0], 96); } @@ -1528,7 +1528,7 @@ void drawPrimitive(IWineD3DDevice *iface, checkGLcall("glEnable(GL_FRAGMENT_PROGRAM_ARB);"); /* init Constants */ - if (TRUE == This->updateStateBlock->Changed.pixelShaderConstant) { + if (This->updateStateBlock->Changed.pixelShaderConstant) { TRACE_(d3d_shader)("pixel shader initializing constants %p\n",pixel_shader); IDirect3DPixelShaderImpl_SetConstantF(pixel_shader, 0, (CONST FLOAT*) &This->updateStateBlock->pixelShaderConstant[0], 8); } diff --git a/dlls/wineps/glyphlist.c b/dlls/wineps/glyphlist.c index 6706ac0e350..9243e03febe 100644 --- a/dlls/wineps/glyphlist.c +++ b/dlls/wineps/glyphlist.c @@ -196,7 +196,7 @@ VOID PSDRV_IndexGlyphList() { INT i; - if (glyphNamesIndexed == TRUE) + if (glyphNamesIndexed) return; TRACE("%i glyph names:\n", glyphListSize); diff --git a/dlls/winmm/mciwave/mciwave.c b/dlls/winmm/mciwave/mciwave.c index fed84a7336c..e00baad7853 100644 --- a/dlls/winmm/mciwave/mciwave.c +++ b/dlls/winmm/mciwave/mciwave.c @@ -467,7 +467,7 @@ static DWORD WAVE_mciOpen(UINT wDevID, DWORD dwFlags, LPMCI_WAVE_OPEN_PARMSA lpO memcpy(&wmw->openParms, lpOpenParms, sizeof(MCI_WAVE_OPEN_PARMSA)); - if (wmw->bTemporaryFile == TRUE) + if (wmw->bTemporaryFile) { /* Additional openParms is temporary file's name */ wmw->openParms.lpstrElementName = pszTmpFileName; diff --git a/programs/regedit/framewnd.c b/programs/regedit/framewnd.c index 9ec5c52bf43..8c22abca260 100644 --- a/programs/regedit/framewnd.c +++ b/programs/regedit/framewnd.c @@ -335,7 +335,7 @@ BOOL PrintRegistryHive(HWND hWnd, LPTSTR path) pd.nToPage = 0xFFFF; pd.nMinPage = 1; pd.nMaxPage = 0xFFFF; - if (PrintDlg(&pd) == TRUE) { + if (PrintDlg(&pd)) { /* GDI calls to render output. */ DeleteDC(pd.hDC); /* Delete DC when done.*/ } diff --git a/programs/uninstaller/main.c b/programs/uninstaller/main.c index 2898df0aa6d..5c0039211ce 100644 --- a/programs/uninstaller/main.c +++ b/programs/uninstaller/main.c @@ -293,7 +293,7 @@ void UninstallProgram(void) si.cb = sizeof(STARTUPINFO); si.wShowWindow = SW_NORMAL; res = CreateProcess(NULL, entries[i].command, NULL, NULL, FALSE, 0, NULL, NULL, &si, &info); - if (res == TRUE) + if (res) { /* wait for the process to exit */ WaitForSingleObject(info.hProcess, INFINITE); res = GetExitCodeProcess(info.hProcess, &exit_code); diff --git a/windows/winproc.c b/windows/winproc.c index bab70339bc0..3859002e21b 100644 --- a/windows/winproc.c +++ b/windows/winproc.c @@ -1372,8 +1372,7 @@ INT WINPROC_MapMsg16To32A( HWND hwnd, UINT16 msg16, WPARAM16 wParam16, UINT *pms *(BOOL*)(*plparam) = 0; return 1; case WM_MDISETMENU: - if(wParam16==TRUE) - *pmsg32=WM_MDIREFRESHMENU; + if(wParam16) *pmsg32=WM_MDIREFRESHMENU; *pwparam32 = (WPARAM)HMENU_32(LOWORD(*plparam)); *plparam = (LPARAM)HMENU_32(HIWORD(*plparam)); return 0;