aboutsummaryrefslogtreecommitdiff
path: root/gl/safe-read.c
diff options
context:
space:
mode:
authorGravatar Thomas Guyot-Sionnest <dermoth@aei.ca> 2010-04-07 21:11:46 -0400
committerGravatar Thomas Guyot-Sionnest <dermoth@aei.ca> 2010-04-12 21:26:35 -0400
commit74da141e618ef99959d509cb2e7be35a348a39db (patch)
tree88ebc38b381a1021fc2d74864a71e230ae591c3d /gl/safe-read.c
parentc63a4f726a0b6ad8cf6040f947754a81fd4683bb (diff)
downloadmonitoring-plugins-74da141e618ef99959d509cb2e7be35a348a39db.tar.gz
Sync with the latest Gnulib code (177f525)
Signed-off-by: Thomas Guyot-Sionnest <dermoth@aei.ca>
Diffstat (limited to 'gl/safe-read.c')
-rw-r--r--gl/safe-read.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/gl/safe-read.c b/gl/safe-read.c
index 0cb1edee..855be677 100644
--- a/gl/safe-read.c
+++ b/gl/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-2010 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;
}
}