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(-)
@@ -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;
@@ -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