From 87ef00fc34ab4269064a1810788dcc864cd5da36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rico=20Sch=C3=BCller?= Date: Mon, 7 Jan 2013 21:57:24 +0100 Subject: [PATCH] d3dx9: Use sizeof variable, not type. --- dlls/d3dx9_36/shader.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/dlls/d3dx9_36/shader.c b/dlls/d3dx9_36/shader.c index 81c832324b1..20fcb26d731 100644 --- a/dlls/d3dx9_36/shader.c +++ b/dlls/d3dx9_36/shader.c @@ -1625,8 +1625,8 @@ HRESULT WINAPI D3DXGetShaderConstantTableEx(const DWORD *byte_code, DWORD flags, HRESULT hr; LPCVOID data; UINT size; - const D3DXSHADER_CONSTANTTABLE* ctab_header; - D3DXSHADER_CONSTANTINFO* constant_info; + const D3DXSHADER_CONSTANTTABLE *ctab_header; + D3DXSHADER_CONSTANTINFO *constant_info; DWORD i; TRACE("byte_code %p, flags %x, constant_table %p\n", byte_code, flags, constant_table); @@ -1654,14 +1654,14 @@ HRESULT WINAPI D3DXGetShaderConstantTableEx(const DWORD *byte_code, DWORD flags, return D3DXERR_INVALIDDATA; } - if (size < sizeof(D3DXSHADER_CONSTANTTABLE)) + if (size < sizeof(*ctab_header)) { WARN("Invalid CTAB size.\n"); return D3DXERR_INVALIDDATA; } ctab_header = (const D3DXSHADER_CONSTANTTABLE *)data; - if (ctab_header->Size != sizeof(D3DXSHADER_CONSTANTTABLE)) + if (ctab_header->Size != sizeof(*ctab_header)) { WARN("Invalid D3DXSHADER_CONSTANTTABLE size.\n"); return D3DXERR_INVALIDDATA; @@ -1750,7 +1750,7 @@ HRESULT WINAPI D3DXGetShaderSamplers(CONST DWORD *byte_code, LPCSTR *samplers, U hr = D3DXFindShaderComment(byte_code, MAKEFOURCC('C','T','A','B'), (LPCVOID *)&data, &size); if (hr != D3D_OK) return D3D_OK; - if (size < sizeof(D3DXSHADER_CONSTANTTABLE)) return D3D_OK; + if (size < sizeof(*ctab_header)) return D3D_OK; ctab_header = (const D3DXSHADER_CONSTANTTABLE *)data; if (ctab_header->Size != sizeof(*ctab_header)) return D3D_OK;