aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--main.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/main.c b/main.c
index 2782980..f974417 100644
--- a/main.c
+++ b/main.c
@@ -35,9 +35,8 @@ static bool write_library(const char *path) {
}
fwrite(libintercept_so, 1, libintercept_so_len, f);
- fclose(f);
- if (ferror(f) != 0) {
- fprintf(stderr, "Could not write to temporary directory\n");
+ if (fclose(f) != 0) {
+ fprintf(stderr, "Could not write to temporary directory (%s)\n", strerror(errno));
return false;
}