diff options
Diffstat (limited to 'gl/safe-read.c')
-rw-r--r-- | gl/safe-read.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/gl/safe-read.c b/gl/safe-read.c index 0cb1ede..855be67 100644 --- a/gl/safe-read.c +++ b/gl/safe-read.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* An interface to read and write that retries after interrupts. | 1 | /* An interface to read and write that retries after interrupts. |
2 | 2 | ||
3 | Copyright (C) 1993, 1994, 1998, 2002, 2003, 2004, 2005, 2006 Free | 3 | Copyright (C) 1993-1994, 1998, 2002-2006, 2009-2010 Free Software |
4 | Software Foundation, Inc. | 4 | Foundation, Inc. |
5 | 5 | ||
6 | This program is free software: you can redistribute it and/or modify | 6 | This program is free software: you can redistribute it and/or modify |
7 | it under the terms of the GNU General Public License as published by | 7 | it under the terms of the GNU General Public License as published by |
@@ -66,12 +66,12 @@ safe_rw (int fd, void const *buf, size_t count) | |||
66 | ssize_t result = rw (fd, buf, count); | 66 | ssize_t result = rw (fd, buf, count); |
67 | 67 | ||
68 | if (0 <= result) | 68 | if (0 <= result) |
69 | return result; | 69 | return result; |
70 | else if (IS_EINTR (errno)) | 70 | else if (IS_EINTR (errno)) |
71 | continue; | 71 | continue; |
72 | else if (errno == EINVAL && BUGGY_READ_MAXIMUM < count) | 72 | else if (errno == EINVAL && BUGGY_READ_MAXIMUM < count) |
73 | count = BUGGY_READ_MAXIMUM; | 73 | count = BUGGY_READ_MAXIMUM; |
74 | else | 74 | else |
75 | return result; | 75 | return result; |
76 | } | 76 | } |
77 | } | 77 | } |