diff --git a/dlls/kernel/local16.c b/dlls/kernel/local16.c index fb512a1015..6f588f5bb3 100644 --- a/dlls/kernel/local16.c +++ b/dlls/kernel/local16.c @@ -1448,7 +1448,7 @@ static HLOCAL16 LOCAL_InternalLock( LPSTR heap, HLOCAL16 handle ) if (HANDLE_MOVEABLE(handle)) { LOCALHANDLEENTRY *pEntry = (LOCALHANDLEENTRY *)(heap + handle); - if (pEntry->flags == LMEM_DISCARDED) return 0; + if (pEntry->flags == (LMEM_DISCARDED >> 8)) return 0; if (pEntry->lock < 0xfe) pEntry->lock++; handle = pEntry->addr; } diff --git a/dlls/kernel/tests/atom.c b/dlls/kernel/tests/atom.c index 4fbcfca2f5..c66ddbeb64 100644 --- a/dlls/kernel/tests/atom.c +++ b/dlls/kernel/tests/atom.c @@ -37,7 +37,7 @@ static void test_add_atom(void) SetLastError( 0xdeadbeef ); atom = GlobalAddAtomA( "foobar" ); - ok( (atom >= 0xc000) && (atom <= 0xffff), "bad atom id %x", atom ); + ok( atom >= 0xc000, "bad atom id %x", atom ); ok( GetLastError() == 0xdeadbeef, "GlobalAddAtomA set last error" ); /* Verify that it can be found (or not) appropriately */ diff --git a/dlls/msvcrt/locale.c b/dlls/msvcrt/locale.c index 4d6c160de0..b1eb357800 100644 --- a/dlls/msvcrt/locale.c +++ b/dlls/msvcrt/locale.c @@ -21,6 +21,9 @@ #include "config.h" #include "wine/port.h" +#include +#include + #include "winbase.h" #include "winuser.h" @@ -30,8 +33,6 @@ #include "wine/debug.h" -#include - WINE_DEFAULT_DEBUG_CHANNEL(msvcrt); /* FIXME: Need to hold locale for each LC_* type and aggregate @@ -258,8 +259,6 @@ static LCID MSVCRT_locale_to_LCID(locale_search_t* locale) return lcid; } -extern int snprintf(char *, int, const char *, ...); - /* INTERNAL: Set ctype behaviour for a codepage */ static void msvcrt_set_ctype(unsigned int codepage, LCID lcid) { diff --git a/dlls/shell32/shell.c b/dlls/shell32/shell.c index a3e461c448..c2b8dc002c 100644 --- a/dlls/shell32/shell.c +++ b/dlls/shell32/shell.c @@ -139,14 +139,13 @@ UINT16 WINAPI DragQueryFile16( if(!lpDropFileStruct) goto end; lpDrop = (LPSTR) lpDropFileStruct + lpDropFileStruct->wSize; - wFile = (wFile==0xffff) ? 0xffffffff : wFile; while (i++ < wFile) { while (*lpDrop++); /* skip filename */ if (!*lpDrop) { - i = (wFile == 0xFFFFFFFF) ? i : 0; + i = (wFile == 0xFFFF) ? i : 0; goto end; } }