diff options
author | Thomas Haller <thaller@redhat.com> | 2013-10-31 17:53:18 +0100 |
---|---|---|
committer | Colin Walters <walters@verbum.org> | 2013-10-31 12:55:57 -0400 |
commit | 7c204267a38449de9d98c2c387961563c18ba550 (patch) | |
tree | ef89fcb68858bdcaf52b7eb9ec8f526d7bc894ad | |
parent | 374fb6906fe866ca28f7c4702db1d1eec7dedd08 (diff) | |
download | libgsystem-7c204267a38449de9d98c2c387961563c18ba550.tar.gz |
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>
-rw-r--r-- | 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; } |