[libgsystem] file-utils: fix wrong condition in open_nointr (open returns -1 on error)
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgsystem] file-utils: fix wrong condition in open_nointr (open returns -1 on error)
- Date: Thu, 31 Oct 2013 16:56:32 +0000 (UTC)
commit 7c204267a38449de9d98c2c387961563c18ba550
Author: Thomas Haller <thaller redhat com>
Date: Thu Oct 31 17:53:18 2013 +0100
file-utils: fix wrong condition in open_nointr (open returns -1 on error)
This error was found by running Coverity.
Signed-off-by: Thomas Haller <thaller redhat com>
gsystem-file-utils.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gsystem-file-utils.c b/gsystem-file-utils.c
index ff97e19..96b317a 100644
--- a/gsystem-file-utils.c
+++ b/gsystem-file-utils.c
@@ -64,7 +64,7 @@ open_nointr (const char *path, int flags, mode_t mode)
int res;
do
res = open (path, flags, mode);
- while (G_UNLIKELY (res != 0 && errno == EINTR));
+ while (G_UNLIKELY (res == -1 && errno == EINTR));
return res;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]