From fb29df3ea25b6f6a5bfdeaa8912997f73d2e4d14 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Thu, 1 Mar 2018 19:29:55 -0500 Subject: [PATCH] src/libadacl.c: fix return type of fgetxattr in acl_copy_xattr(). --- src/libadacl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libadacl.c b/src/libadacl.c index 22f5d7b..1b31938 100644 --- a/src/libadacl.c +++ b/src/libadacl.c @@ -567,7 +567,7 @@ int acl_copy_xattr(int src_fd, return ACL_ERROR; } - size_t src_size_guess = fgetxattr(src_fd, src_name, NULL, 0); + ssize_t src_size_guess = fgetxattr(src_fd, src_name, NULL, 0); if (src_size_guess == XATTR_ERROR) { if (errno == ENODATA) { /* A missing ACL isn't really an error. ENOATTR and ENODATA are @@ -580,7 +580,7 @@ int acl_copy_xattr(int src_fd, } char* src_acl_p = alloca(src_size_guess); /* The actual size may be smaller than our guess? I don't know. */ - size_t src_size = fgetxattr(src_fd, src_name, src_acl_p, (int)src_size_guess); + ssize_t src_size = fgetxattr(src_fd, src_name, src_acl_p, src_size_guess); if (src_size == XATTR_ERROR) { if (errno == ENODATA) { /* A missing ACL isn't an error. */ -- 2.44.2