diff options
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/disk.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/util/disk.c b/src/util/disk.c index b0a8ad7b0..da78a1e1d 100644 --- a/src/util/disk.c +++ b/src/util/disk.c | |||
@@ -868,7 +868,9 @@ GNUNET_DISK_file_read (const struct GNUNET_DISK_FileHandle *h, | |||
868 | { | 868 | { |
869 | if (GetLastError () != ERROR_IO_PENDING) | 869 | if (GetLastError () != ERROR_IO_PENDING) |
870 | { | 870 | { |
871 | LOG (GNUNET_ERROR_TYPE_DEBUG, "Error reading from pipe: %u\n", GetLastError ()); | 871 | LOG (GNUNET_ERROR_TYPE_DEBUG, |
872 | "Error reading from pipe: %u\n", | ||
873 | GetLastError ()); | ||
872 | SetErrnoFromWinError (GetLastError ()); | 874 | SetErrnoFromWinError (GetLastError ()); |
873 | return GNUNET_SYSERR; | 875 | return GNUNET_SYSERR; |
874 | } | 876 | } |
@@ -983,6 +985,7 @@ GNUNET_DISK_fn_read (const char *fn, | |||
983 | { | 985 | { |
984 | struct GNUNET_DISK_FileHandle *fh; | 986 | struct GNUNET_DISK_FileHandle *fh; |
985 | ssize_t ret; | 987 | ssize_t ret; |
988 | int eno; | ||
986 | 989 | ||
987 | fh = GNUNET_DISK_file_open (fn, | 990 | fh = GNUNET_DISK_file_open (fn, |
988 | GNUNET_DISK_OPEN_READ, | 991 | GNUNET_DISK_OPEN_READ, |
@@ -990,8 +993,9 @@ GNUNET_DISK_fn_read (const char *fn, | |||
990 | if (NULL == fh) | 993 | if (NULL == fh) |
991 | return GNUNET_SYSERR; | 994 | return GNUNET_SYSERR; |
992 | ret = GNUNET_DISK_file_read (fh, result, len); | 995 | ret = GNUNET_DISK_file_read (fh, result, len); |
996 | eno = errno; | ||
993 | GNUNET_assert (GNUNET_OK == GNUNET_DISK_file_close (fh)); | 997 | GNUNET_assert (GNUNET_OK == GNUNET_DISK_file_close (fh)); |
994 | 998 | errno = eno; | |
995 | return ret; | 999 | return ret; |
996 | } | 1000 | } |
997 | 1001 | ||