Andrew Talbot : kernel32: Remove unused variables.
Alexandre Julliard
julliard at winehq.org
Thu Nov 22 13:48:21 CST 2012
Module: wine
Branch: master
Commit: 1973a808c26f294bd0fad0023c1115c2c231353c
URL: http://source.winehq.org/git/wine.git/?a=commit;h=1973a808c26f294bd0fad0023c1115c2c231353c
Author: Andrew Talbot <andrew.talbot at talbotville.com>
Date: Wed Nov 21 21:16:44 2012 +0000
kernel32: Remove unused variables.
---
dlls/kernel32/profile.c | 7 +++----
dlls/kernel32/resource.c | 3 +--
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/dlls/kernel32/profile.c b/dlls/kernel32/profile.c
index 3d00c29..87c3cd7 100644
--- a/dlls/kernel32/profile.c
+++ b/dlls/kernel32/profile.c
@@ -1236,12 +1236,11 @@ UINT WINAPI GetPrivateProfileIntW( LPCWSTR section, LPCWSTR entry,
{
WCHAR buffer[30];
UNICODE_STRING bufferW;
- INT len;
ULONG result;
- if (!(len = GetPrivateProfileStringW( section, entry, emptystringW,
- buffer, sizeof(buffer)/sizeof(WCHAR),
- filename )))
+ if (GetPrivateProfileStringW( section, entry, emptystringW,
+ buffer, sizeof(buffer)/sizeof(WCHAR),
+ filename ) == 0)
return def_val;
/* FIXME: if entry can be found but it's empty, then Win16 is
diff --git a/dlls/kernel32/resource.c b/dlls/kernel32/resource.c
index b9a93c4..0235b3c 100644
--- a/dlls/kernel32/resource.c
+++ b/dlls/kernel32/resource.c
@@ -830,7 +830,6 @@ static IMAGE_NT_HEADERS *get_nt_header( void *base, DWORD mapping_size )
static IMAGE_SECTION_HEADER *get_section_header( void *base, DWORD mapping_size, DWORD *num_sections )
{
IMAGE_NT_HEADERS *nt;
- IMAGE_SECTION_HEADER *sec;
DWORD section_ofs;
nt = get_nt_header( base, mapping_size );
@@ -839,7 +838,7 @@ static IMAGE_SECTION_HEADER *get_section_header( void *base, DWORD mapping_size,
/* check that we don't go over the end of the file accessing the sections */
section_ofs = FIELD_OFFSET(IMAGE_NT_HEADERS, OptionalHeader) + nt->FileHeader.SizeOfOptionalHeader;
- if ((nt->FileHeader.NumberOfSections * sizeof (*sec) + section_ofs) > mapping_size)
+ if ((nt->FileHeader.NumberOfSections * sizeof (IMAGE_SECTION_HEADER) + section_ofs) > mapping_size)
return NULL;
if (num_sections)
More information about the wine-cvs
mailing list