[1/4] posix_fallocate, posix_fallocate64 stub: Do not set errno

Message ID 20150424134510.5033C41F484D0@oldenburg.str.redhat.com
State Committed
Headers

Commit Message

Florian Weimer April 24, 2015, 11:18 a.m. UTC
  These functions return an error code.
---
 ChangeLog              | 5 +++++
 io/posix_fallocate.c   | 3 +--
 io/posix_fallocate64.c | 3 +--
 3 files changed, 7 insertions(+), 4 deletions(-)
  

Comments

Roland McGrath April 24, 2015, 4:44 p.m. UTC | #1
That's good.
  

Patch

diff --git a/ChangeLog b/ChangeLog
index 2c01eac..7a5e2b9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@ 
+2015-04-24  Florian Weimer  <fweimer@redhat.com>
+
+	* io/posix_fallocate.c (posix_fallocate): Do not set errno.
+	* io/posix_fallocate64.c (posix_fallocate64): Likewise.
+
 2015-04-22  Wilco Dijkstra  <wdijkstr@arm.com>
 
 	* math/k_casinh.c (__kernel_casinh): Use __copysign.
diff --git a/io/posix_fallocate.c b/io/posix_fallocate.c
index e16c900..8eefc62 100644
--- a/io/posix_fallocate.c
+++ b/io/posix_fallocate.c
@@ -23,7 +23,6 @@ 
 int
 posix_fallocate (int fd, __off_t offset, __off_t len)
 {
-  __set_errno (ENOSYS);
-  return -1;
+  return ENOSYS;
 }
 stub_warning (posix_fallocate)
diff --git a/io/posix_fallocate64.c b/io/posix_fallocate64.c
index a5ffb7f..05922d1 100644
--- a/io/posix_fallocate64.c
+++ b/io/posix_fallocate64.c
@@ -23,7 +23,6 @@ 
 int
 posix_fallocate64 (int fd, __off64_t offset, __off64_t len)
 {
-  __set_errno (ENOSYS);
-  return -1;
+  return ENOSYS;
 }
 stub_warning (posix_fallocate64)