[RFC PATCH glibc 4/12] hurd: Fix xattr error value

Sergey Bugaev bugaevc@gmail.com
Sun Feb 12 11:10:35 GMT 2023


This does not seem like it is supposed to return negative error codes.

Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
---
 hurd/xattr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hurd/xattr.c b/hurd/xattr.c
index 48914bcf..5a0fc263 100644
--- a/hurd/xattr.c
+++ b/hurd/xattr.c
@@ -68,7 +68,7 @@ _hurd_xattr_get (io_t port, const char *name, void *value, size_t *size)
 	{
 	  if (buf != value)
 	    __munmap (buf, bufsz);
-	  return -ERANGE;
+	  return ERANGE;
 	}
       if (buf != value && bufsz > 0)
 	{
-- 
2.39.1



More information about the Libc-alpha mailing list