From ea15a5445fcb8922524ca8c8502a08e7d3572f3d Mon Sep 17 00:00:00 2001 From: Zhiyi Zhang Date: Tue, 14 Sep 2021 21:10:46 +0800 Subject: [PATCH] avicap32: Use the correct return type for get_device_desc(). get_device_desc() should return a NTSTATUS instead of a BOOL. Fix a regression that video capture devices cannot be opened because of the changes in abb1757. Signed-off-by: Zhiyi Zhang Signed-off-by: Alexandre Julliard --- dlls/avicap32/v4l.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/avicap32/v4l.c b/dlls/avicap32/v4l.c index ab2694ae041..0b004e17e58 100644 --- a/dlls/avicap32/v4l.c +++ b/dlls/avicap32/v4l.c @@ -119,14 +119,14 @@ static NTSTATUS get_device_desc(void *args) v4l_umbstowcs(version, ret, params->version, ARRAY_SIZE(params->version)); } close(fd); - return is_capture_device; + return is_capture_device ? STATUS_SUCCESS : STATUS_UNSUCCESSFUL; } /* errno 515 is used by some webcam drivers for unknown IOCTL commands. */ ERR("Failed to get capabilities for %s: %s\n", device, strerror(errno)); close(fd); - return FALSE; + return STATUS_UNSUCCESSFUL; } const unixlib_entry_t __wine_unix_call_funcs[] =