From ed3ea040bae8ef2cf131081124a1248a9fd3dca9 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Wed, 15 Mar 2017 13:13:58 +0100 Subject: support: Add error checking to close system calls [BZ #21244] --- support/support_run_diff.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'support/support_run_diff.c') diff --git a/support/support_run_diff.c b/support/support_run_diff.c index 3085037a69..f5155de727 100644 --- a/support/support_run_diff.c +++ b/support/support_run_diff.c @@ -24,8 +24,8 @@ #include #include #include +#include #include -#include static char * write_to_temp_file (const char *prefix, const char *str) @@ -36,7 +36,7 @@ write_to_temp_file (const char *prefix, const char *str) TEST_VERIFY_EXIT (fd >= 0); free (template); xwrite (fd, str, strlen (str)); - TEST_VERIFY_EXIT (close (fd) == 0); + xclose (fd); return name; } -- cgit v1.2.3