From: Andreas Weber <andreas.weber@hs-offenburg.de>
To: linux-media@vger.kernel.org
Subject: 2 bugs (errno = EINTR) in v4l2grab.c and v4l2gl.c?
Date: Thu, 16 Jan 2014 18:45:56 +0100 [thread overview]
Message-ID: <52D81AD4.3050504@hs-offenburg.de> (raw)
[-- Attachment #1: Type: text/plain, Size: 254 bytes --]
Dear maintainers,
I guess these are 2 bugs:
contrib/test/v4l2grab.c:132: } while ((r == -1 && (errno = EINTR)));
contrib/test/v4l2gl.c:227: } while ((r == -1 && (errno = EINTR)));
please consider my attached patch if it's really a bug.
Regards, Andy
[-- Attachment #2: errno_assignment.patch --]
[-- Type: text/x-diff, Size: 1269 bytes --]
>From 63d4fd18cb91852b64c81bf63d0d4100fc53d38d Mon Sep 17 00:00:00 2001
From: Andreas Weber <andreas.weber@hs-offenburg.de>
Date: Thu, 16 Jan 2014 18:43:31 +0100
Subject: [PATCH] bugfix for errno assignment in while loop
---
contrib/test/v4l2gl.c | 2 +-
contrib/test/v4l2grab.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/contrib/test/v4l2gl.c b/contrib/test/v4l2gl.c
index e921212..4b549c1 100644
--- a/contrib/test/v4l2gl.c
+++ b/contrib/test/v4l2gl.c
@@ -224,7 +224,7 @@ static int capture(char *dev_name, int x_res, int y_res, int n_frames,
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;
diff --git a/contrib/test/v4l2grab.c b/contrib/test/v4l2grab.c
index a93ad43..14d2a8f 100644
--- a/contrib/test/v4l2grab.c
+++ b/contrib/test/v4l2grab.c
@@ -129,7 +129,7 @@ static int capture(char *dev_name, int x_res, int y_res, int n_frames,
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;
--
1.7.10.4
reply other threads:[~2014-01-16 17:45 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=52D81AD4.3050504@hs-offenburg.de \
--to=andreas.weber@hs-offenburg.de \
--cc=linux-media@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.