Re: [PATCH] media: docs: Change unintended assignment in v4l

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Quoting Daniel Lundberg Pedersen (2022-01-11 16:48:55)
> Example should be comparing errno to EINTR instead of doing assignment.
> 

Ouch - that's not helpful in documentation indeed.
Good spot, and fix.

It might help to say 'in v4l2grab' in the $SUBJECT rather than 'v4l' as
that would be a bit more specific.

Reviewed-by: Kieran Bingham <kieran.bingham+renesas@xxxxxxxxxxxxxxxx>

> Signed-off-by: Daniel Lundberg Pedersen <dlp@xxxxxxxx>
> ---
>  Documentation/userspace-api/media/v4l/v4l2grab.c.rst | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/Documentation/userspace-api/media/v4l/v4l2grab.c.rst b/Documentation/userspace-api/media/v4l/v4l2grab.c.rst
> index eaa0f95048e7..c98a78d63a8b 100644
> --- a/Documentation/userspace-api/media/v4l/v4l2grab.c.rst
> +++ b/Documentation/userspace-api/media/v4l/v4l2grab.c.rst
> @@ -134,7 +134,7 @@ file: media/v4l/v4l2grab.c
>                             tv.tv_usec = 0;
>  
>                             r = select(fd + 1, &fds, NULL, NULL, &tv);
> -                   } while ((r == -1 && (errno = EINTR)));
> +                   } while ((r == -1 && (errno == EINTR)));
>                     if (r == -1) {
>                             perror("select");
>                             return errno;
> -- 
> 2.33.1
>




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux