diff --git a/dlls/winebus.sys/bus_iohid.c b/dlls/winebus.sys/bus_iohid.c index 501a40d26ed..ac706f5265c 100644 --- a/dlls/winebus.sys/bus_iohid.c +++ b/dlls/winebus.sys/bus_iohid.c @@ -295,7 +295,7 @@ static void handle_DeviceMatchingCallback(void *context, IOReturn result, void * pid = CFNumberToDWORD(IOHIDDeviceGetProperty(IOHIDDevice, CFSTR(kIOHIDProductIDKey))); version = CFNumberToDWORD(IOHIDDeviceGetProperty(IOHIDDevice, CFSTR(kIOHIDVersionNumberKey))); str = IOHIDDeviceGetProperty(IOHIDDevice, CFSTR(kIOHIDSerialNumberKey)); - if (str) CFStringToWSTR(str, serial_string, sizeof(serial_string) / sizeof(WCHAR)); + if (str) CFStringToWSTR(str, serial_string, ARRAY_SIZE(serial_string)); if (IOHIDDeviceConformsTo(IOHIDDevice, kHIDPage_GenericDesktop, kHIDUsage_GD_GamePad) || IOHIDDeviceConformsTo(IOHIDDevice, kHIDPage_GenericDesktop, kHIDUsage_GD_Joystick)) diff --git a/dlls/winebus.sys/main.c b/dlls/winebus.sys/main.c index 2f3c05aa96a..deb2c86d96d 100644 --- a/dlls/winebus.sys/main.c +++ b/dlls/winebus.sys/main.c @@ -696,7 +696,7 @@ BOOL is_xbox_gamepad(WORD vid, WORD pid) if (vid != VID_MICROSOFT) return FALSE; - for (i = 0; i < sizeof(PID_XBOX_CONTROLLERS)/sizeof(*PID_XBOX_CONTROLLERS); i++) + for (i = 0; i < ARRAY_SIZE(PID_XBOX_CONTROLLERS); i++) if (pid == PID_XBOX_CONTROLLERS[i]) return TRUE; return FALSE;