X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fsafe-read.c;h=d9cb3308d0cc887320d33b1c8b609fc59492b9b6;hb=70a72e0f50411ccc776379a761725d8c8bec58a3;hp=0cb1edee8bc789ab6589d2cd93c7e265ce1a418a;hpb=57fdfd3f8ec62b105c53bcdf6f127c35c7fe7391;p=gnulib.git diff --git a/lib/safe-read.c b/lib/safe-read.c index 0cb1edee8..d9cb3308d 100644 --- a/lib/safe-read.c +++ b/lib/safe-read.c @@ -1,7 +1,7 @@ /* An interface to read and write that retries after interrupts. - Copyright (C) 1993, 1994, 1998, 2002, 2003, 2004, 2005, 2006 Free - Software Foundation, Inc. + Copyright (C) 1993-1994, 1998, 2002-2006, 2009-2011 Free Software + Foundation, Inc. This program is free software: you can redistribute it and/or modify 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) ssize_t result = rw (fd, buf, count); if (0 <= result) - return result; + return result; else if (IS_EINTR (errno)) - continue; + continue; else if (errno == EINVAL && BUGGY_READ_MAXIMUM < count) - count = BUGGY_READ_MAXIMUM; + count = BUGGY_READ_MAXIMUM; else - return result; + return result; } }