[glib] gkeyfile: Fix FD validity test to be technically correct
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] gkeyfile: Fix FD validity test to be technically correct
- Date: Fri, 2 Feb 2018 08:21:29 +0000 (UTC)
commit fc857073a01d2fcc0e5f0ec3ad0fe9baecc6fb69
Author: Stewart Brodie <stewart eh org>
Date: Fri Jan 8 14:35:00 2016 +0000
gkeyfile: Fix FD validity test to be technically correct
The fd could be valid and zero.
https://bugzilla.gnome.org/show_bug.cgi?id=760324
glib/gkeyfile.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/glib/gkeyfile.c b/glib/gkeyfile.c
index 732e05b..05367df 100644
--- a/glib/gkeyfile.c
+++ b/glib/gkeyfile.c
@@ -789,7 +789,7 @@ find_file_in_data_dirs (const gchar *file,
"found in search dirs"));
}
- if (output_file != NULL && fd > 0)
+ if (output_file != NULL && fd != -1)
*output_file = g_strdup (path);
g_free (path);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]