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

Message ID 20230212111044.610942-5-bugaevc@gmail.com
State Committed, archived
Headers
Series Towards glibc on x86_64-gnu |

Checks

Context Check Description
dj/TryBot-apply_patch success Patch applied to master at the time it was sent

Commit Message

Sergey Bugaev Feb. 12, 2023, 11:10 a.m. UTC
  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(-)
  

Comments

Samuel Thibault Feb. 12, 2023, 2:56 p.m. UTC | #1
Applied, thanks!

Sergey Bugaev, le dim. 12 févr. 2023 14:10:35 +0300, a ecrit:
> 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
> 
>
  

Patch

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)
 	{