Skip to contentSkip to conversation

media: docs: v4l2grab.c.rst: change unintended assignment

PATCH In review Daniel Lundberg Pedersen 2 participants 2 messages Jan 12, 2022 – Jan 13, 2022 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 media: docs: v4l2grab.c.rst: change unintended assignment

Example should be comparing errno to EINTR instead of doing assignment.

---
 Documentation/userspace-api/media/v4l/v4l2grab.c.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/userspace-api/media/v4l/v4l2grab.c.rst +1 -1
index eaa0f95048e7..c98a78d63a8b 100644
@@ -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;
Signature · 1 line
2.33.1
Reviewed-by on v2 1/1
#1 lore raw

Hi Daniel,

Thanks for fixing up and sending a v2.

Quoting Daniel Lundberg Pedersen (2022-01-12 12:28:09)

Quoted 3 lines

Example should be comparing errno to EINTR instead of doing assignment.

I think my tag from the previous patch still holds here for the change itself.

Quoted 20 lines
---
 Documentation/userspace-api/media/v4l/v4l2grab.c.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/userspace-api/media/v4l/v4l2grab.c.rst +1 -1
index eaa0f95048e7..c98a78d63a8b 100644
@@ -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;
Signature · 1 line
2.33.1