From: Tyler Hicks Date: Mon, 27 Apr 2009 18:31:12 +0000 (-0500) Subject: eCryptfs: Fix min function comparison warning X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ac20100df7a7a042423dcb8847f42d9f6ddb8d00;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git eCryptfs: Fix min function comparison warning This warning shows up on 64 bit builds: fs/ecryptfs/inode.c:693: warning: comparison of distinct pointer types lacks a cast Signed-off-by: Tyler Hicks --- diff --git a/fs/ecryptfs/inode.c b/fs/ecryptfs/inode.c index 1940edd08307..2f0945d63297 100644 --- a/fs/ecryptfs/inode.c +++ b/fs/ecryptfs/inode.c @@ -690,7 +690,7 @@ ecryptfs_readlink(struct dentry *dentry, char __user *buf, int bufsiz) } /* Check for bufsiz <= 0 done in sys_readlinkat() */ rc = copy_to_user(buf, plaintext_name, - min((unsigned) bufsiz, plaintext_name_size)); + min((size_t) bufsiz, plaintext_name_size)); if (rc) rc = -EFAULT; else