summaryrefslogtreecommitdiff
path: root/plugins/KeyboardNotify
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/KeyboardNotify')
-rw-r--r--plugins/KeyboardNotify/src/keyboard.cpp8
-rw-r--r--plugins/KeyboardNotify/src/main.cpp4
2 files changed, 6 insertions, 6 deletions
diff --git a/plugins/KeyboardNotify/src/keyboard.cpp b/plugins/KeyboardNotify/src/keyboard.cpp
index fba56a5d6c..1b11915e45 100644
--- a/plugins/KeyboardNotify/src/keyboard.cpp
+++ b/plugins/KeyboardNotify/src/keyboard.cpp
@@ -40,11 +40,11 @@ BOOL OpenKeyboardDevice()
TCHAR aux1[MAX_PATH+1], aux2[MAX_PATH+1];
do {
- mir_sntprintf(aux1, _countof(aux1), _T("Kbd%d"), i);
- mir_sntprintf(aux2, _countof(aux2), _T("\\Device\\KeyboardClass%d"), i);
+ mir_sntprintf(aux1, _T("Kbd%d"), i);
+ mir_sntprintf(aux2, _T("\\Device\\KeyboardClass%d"), i);
DefineDosDevice(DDD_RAW_TARGET_PATH, aux1, aux2);
- mir_sntprintf(aux1, _countof(aux1), _T("\\\\.\\Kbd%d"), i);
+ mir_sntprintf(aux1, _T("\\\\.\\Kbd%d"), i);
hKbdDev[i] = CreateFile(aux1, GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL);
} while (hKbdDev[i] != INVALID_HANDLE_VALUE && ++i < MAX_KBDHANDLES);
@@ -80,7 +80,7 @@ void CloseKeyboardDevice()
if (hKbdDev[i] != INVALID_HANDLE_VALUE)
CloseHandle(hKbdDev[i]);
- mir_sntprintf(aux, _countof(aux), _T("Kbd%d"), i);
+ mir_sntprintf(aux, _T("Kbd%d"), i);
DefineDosDevice(DDD_REMOVE_DEFINITION, aux, NULL);
} while (hKbdDev[i] != INVALID_HANDLE_VALUE && ++i < MAX_KBDHANDLES);
diff --git a/plugins/KeyboardNotify/src/main.cpp b/plugins/KeyboardNotify/src/main.cpp
index 183aeb0f4e..0ae9e613f0 100644
--- a/plugins/KeyboardNotify/src/main.cpp
+++ b/plugins/KeyboardNotify/src/main.cpp
@@ -721,9 +721,9 @@ static int ModulesLoaded(WPARAM, LPARAM)
// Create some synchronisation objects
createEventPrefix(eventPrefix, MAX_PATH - 11);
- mir_sntprintf(eventName, _countof(eventName), _T("%s/FlashEvent"), eventPrefix);
+ mir_sntprintf(eventName, _T("%s/FlashEvent"), eventPrefix);
hFlashEvent = CreateEvent(NULL, FALSE, FALSE, eventName);
- mir_sntprintf(eventName, _countof(eventName), _T("%s/ExitEvent"), eventPrefix);
+ mir_sntprintf(eventName, _T("%s/ExitEvent"), eventPrefix);
hExitEvent = CreateEvent(NULL, FALSE, FALSE, eventName);
hThread = mir_forkthread(FlashThreadFunction, 0);