Signed-off-by: Michael Stefaniuc mstefani@winehq.org --- dlls/dmloader/debug.c | 10 +++++----- dlls/dmloader/loader.c | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/dlls/dmloader/debug.c b/dlls/dmloader/debug.c index 9d4877643a..d072391ef6 100644 --- a/dlls/dmloader/debug.c +++ b/dlls/dmloader/debug.c @@ -269,7 +269,7 @@ const char *debugstr_dmguid (const GUID *id) { unsigned int i;
if (!id) return "(null)"; - for (i = 0; i < sizeof(guids)/sizeof(guids[0]); i++) { + for (i = 0; i < ARRAY_SIZE(guids); i++) { if (IsEqualGUID(id, guids[i].guid)) return guids[i].name; } @@ -416,7 +416,7 @@ const char *debugstr_dmreturn (DWORD code) { }; unsigned int i; - for (i = 0; i < sizeof(codes)/sizeof(codes[0]); i++) { + for (i = 0; i < ARRAY_SIZE(codes); i++) { if (code == codes[i].val) return codes[i].name; } @@ -461,7 +461,7 @@ static const char *debugstr_DMUS_OBJ_FLAGS (DWORD flagmask) { FE(DMUS_OBJ_MEMORY), FE(DMUS_OBJ_STREAM) }; - return debugstr_flags (flagmask, flags, sizeof(flags)/sizeof(flags[0])); + return debugstr_flags(flagmask, flags, ARRAY_SIZE(flags)); }
/* dump DMUS_CONTAINER flags */ @@ -469,7 +469,7 @@ static const char *debugstr_DMUS_CONTAINER_FLAGS (DWORD flagmask) { static const flag_info flags[] = { FE(DMUS_CONTAINER_NOLOADS) }; - return debugstr_flags (flagmask, flags, sizeof(flags)/sizeof(flags[0])); + return debugstr_flags(flagmask, flags, ARRAY_SIZE(flags)); }
/* dump DMUS_CONTAINED_OBJF flags */ @@ -477,7 +477,7 @@ static const char *debugstr_DMUS_CONTAINED_OBJF_FLAGS (DWORD flagmask) { static const flag_info flags[] = { FE(DMUS_CONTAINED_OBJF_KEEP) }; - return debugstr_flags (flagmask, flags, sizeof(flags)/sizeof(flags[0])); + return debugstr_flags(flagmask, flags, ARRAY_SIZE(flags)); }
/* Dump whole DMUS_OBJECTDESC struct */ diff --git a/dlls/dmloader/loader.c b/dlls/dmloader/loader.c index 10a2151fcb..8b979da36a 100644 --- a/dlls/dmloader/loader.c +++ b/dlls/dmloader/loader.c @@ -894,9 +894,9 @@ static HRESULT WINAPI IDirectMusicLoaderImpl_LoadObjectFromFile(IDirectMusicLoad */ get_search_path(This, rguidClassID, wszLoaderSearchPath); /* search in current directory */ - if (!SearchPathW (NULL, pwzFilePath, NULL, sizeof(ObjDesc.wszFileName)/sizeof(WCHAR), ObjDesc.wszFileName, NULL) && + if (!SearchPathW(NULL, pwzFilePath, NULL, ARRAY_SIZE(ObjDesc.wszFileName), ObjDesc.wszFileName, NULL) && /* search in loader's search path */ - !SearchPathW (wszLoaderSearchPath, pwzFilePath, NULL, sizeof(ObjDesc.wszFileName)/sizeof(WCHAR), ObjDesc.wszFileName, NULL)) { + !SearchPathW(wszLoaderSearchPath, pwzFilePath, NULL, ARRAY_SIZE(ObjDesc.wszFileName), ObjDesc.wszFileName, NULL)) { /* cannot find file */ TRACE(": cannot find file\n"); return DMUS_E_LOADER_FAILEDOPEN;