projects
/
platform
/
upstream
/
glib.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fedc0cf
)
testglib: test_file_functions: don't close fd if it's -1
author
Simon McVittie
<simon.mcvittie@collabora.co.uk>
Mon, 12 Dec 2011 15:55:59 +0000
(15:55 +0000)
committer
Simon McVittie
<simon.mcvittie@collabora.co.uk>
Wed, 14 Dec 2011 12:40:02 +0000
(12:40 +0000)
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=666115
Reviewed-by: Matthias Clasen <mclasen@redhat.com>
tests/testglib.c
patch
|
blob
|
history
diff --git
a/tests/testglib.c
b/tests/testglib.c
index
1a06d10
..
2b7725e
100644
(file)
--- a/
tests/testglib.c
+++ b/
tests/testglib.c
@@
-952,7
+952,8
@@
test_file_functions (void)
else
g_print ("g_file_open_tmp correctly returns error: %s\n", error->message);
}
- close (fd);
+ if (fd != -1)
+ close (fd);
g_clear_error (&error);
#ifdef G_OS_WIN32