https://git.reactos.org/?p=reactos.git;a=commitdiff;h=b0d66e68c17a118d26691…
commit b0d66e68c17a118d26691a040c26d61e418b9168
Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
AuthorDate: Tue Oct 5 07:57:14 2021 +0900
Commit: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
CommitDate: Tue Oct 5 07:57:14 2021 +0900
[IMM32] s/4/sizeof(DWORD)/
CORE-11700
---
dll/win32/imm32/ime.c | 2 +-
dll/win32/imm32/imm.c | 8 ++++----
dll/win32/imm32/utils.c | 4 ++--
3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/dll/win32/imm32/ime.c b/dll/win32/imm32/ime.c
index 02b47bd1b88..9ae6115fe49 100644
--- a/dll/win32/imm32/ime.c
+++ b/dll/win32/imm32/ime.c
@@ -70,7 +70,7 @@ BOOL APIENTRY Imm32InquireIme(PIMEDPI pImeDpi)
szUIClass[_countof(szUIClass) - 1] = 0;
if (pImeInfo->dwPrivateDataSize == 0)
- pImeInfo->dwPrivateDataSize = 4;
+ pImeInfo->dwPrivateDataSize = sizeof(DWORD);
#define VALID_IME_PROP (IME_PROP_AT_CARET | \
IME_PROP_SPECIAL_UI | \
diff --git a/dll/win32/imm32/imm.c b/dll/win32/imm32/imm.c
index c840cdf3ee7..db537ad9bf0 100644
--- a/dll/win32/imm32/imm.c
+++ b/dll/win32/imm32/imm.c
@@ -202,14 +202,14 @@ VOID APIENTRY Imm32SelectLayout(HKL hNewKL, HKL hOldKL, HIMC hIMC)
pClientImc->uCodePage = CP_ACP;
}
- if (cbNewPrivate < 4)
- cbNewPrivate = 4;
+ if (cbNewPrivate < sizeof(DWORD))
+ cbNewPrivate = sizeof(DWORD);
if (pOldImeDpi)
cbOldPrivate = pOldImeDpi->ImeInfo.dwPrivateDataSize;
- if (cbOldPrivate < 4)
- cbOldPrivate = 4;
+ if (cbOldPrivate < sizeof(DWORD))
+ cbOldPrivate = sizeof(DWORD);
if (pClientImc->hKL == hOldKL)
{
diff --git a/dll/win32/imm32/utils.c b/dll/win32/imm32/utils.c
index 5be74913595..74c234a0eae 100644
--- a/dll/win32/imm32/utils.c
+++ b/dll/win32/imm32/utils.c
@@ -341,8 +341,8 @@ BOOL WINAPI CtfImmIsTextFrameServiceDisabled(VOID)
*/
HIMCC WINAPI ImmCreateIMCC(DWORD size)
{
- if (size < 4)
- size = 4;
+ if (size < sizeof(DWORD))
+ size = sizeof(DWORD);
return LocalAlloc(LHND, size);
}