Commit ac20100d authored by Tyler Hicks's avatar Tyler Hicks

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: default avatarTyler Hicks <tyhicks@linux.vnet.ibm.com>
parent 802b352f
...@@ -690,7 +690,7 @@ ecryptfs_readlink(struct dentry *dentry, char __user *buf, int bufsiz) ...@@ -690,7 +690,7 @@ ecryptfs_readlink(struct dentry *dentry, char __user *buf, int bufsiz)
} }
/* Check for bufsiz <= 0 done in sys_readlinkat() */ /* Check for bufsiz <= 0 done in sys_readlinkat() */
rc = copy_to_user(buf, plaintext_name, rc = copy_to_user(buf, plaintext_name,
min((unsigned) bufsiz, plaintext_name_size)); min((size_t) bufsiz, plaintext_name_size));
if (rc) if (rc)
rc = -EFAULT; rc = -EFAULT;
else else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment