Zhiyi Zhang (@zhiyi) commented about dlls/win32u/sysparams.c:
+ { + name[len] = '\\'; + name_len = len; + } + } + if (len == ARRAY_SIZE(name)) return STATUS_INVALID_PARAMETER; + name[len] = 0; + if (!name_len || strncmp( name, "\\\\?\\", 4 )) return STATUS_INVALID_PARAMETER; + if (strcmp( name + name_len + 1, guid_display_device_arrivalA )) return STATUS_INVALID_PARAMETER; + + name_len -= 4; + if (!lock_display_devices( FALSE )) return STATUS_UNSUCCESSFUL; + LIST_FOR_EACH_ENTRY( gpu, &gpus, struct gpu, entry ) + { + len = strlen( gpu->path ); + if ((found = (len == name_len && !strncmp( name + 4, gpu->path, len )))) You can use `!strncmp( name + 4, gpu->path, name_len )` and avoid the `strlen(gpu->path)` call.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/8111#note_104171