From: Shachar Sharon Date: Thu, 30 May 2024 08:02:37 +0000 (+0300) Subject: vfs_ceph: explicit cast to uint64_t upon failure of ceph_statfs X-Git-Tag: tdb-1.4.11~285 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a7d34ec597fe810090d28bfda636b7450ecb06e5;p=thirdparty%2Fsamba.git vfs_ceph: explicit cast to uint64_t upon failure of ceph_statfs When a call to 'ceph_statfs' from with 'cephwrap_disk_free' returns non-zero status do an explicit cast to uint64_t for the negative (-1) value returned by 'status_code'. Signed-off-by: Shachar Sharon Reviewed-by: Andrew Bartlett Reviewed-by: David Disseldorp Reviewed-by: Ralph Boehme Reviewed-by: Guenther Deschner Reviewed-by: Anoop C S --- diff --git a/source3/modules/vfs_ceph.c b/source3/modules/vfs_ceph.c index 425c623f343..67ffe311a56 100644 --- a/source3/modules/vfs_ceph.c +++ b/source3/modules/vfs_ceph.c @@ -349,7 +349,7 @@ static uint64_t cephwrap_disk_free(struct vfs_handle_struct *handle, ret = ceph_statfs(handle->data, smb_fname->base_name, &statvfs_buf); if (ret < 0) { DBG_DEBUG("[CEPH] ceph_statfs returned %d\n", ret); - return status_code(ret); + return (uint64_t)status_code(ret); } /* * Provide all the correct values.