public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Mika Kukkonen <mikukkon@gmail.com>
To: ecryptfs-devel@lists.sourceforge.net
Cc: akpm@osdl.org, linux-kernel@vger.kernel.org
Subject: [PATCH] Fix bug in fs/ecryptfs/inode.c: ecryptfs_encode_filename() returns int, not unsigned int
Date: Fri, 27 Oct 2006 10:48:56 +0300	[thread overview]
Message-ID: <4541B9E8.2030402@gmail.com> (raw)

[PATCH] Fix bug in fs/ecryptfs/inode.c: ecryptfs_encode_filename()
        returns int (with possible negative error value), not
        unsigned int. Both callers in the file get it wrong (they
        are also the only callers of this function). Found by gcc
        extra warning flags (the return value is checked to be < 0,
        which is pointless with unsigned). Compile tested only, but
        should be OK, as the value computed in the function
        internally is int too.

Signed-off-by: Mika Kukkonen <mikukkon@iki.fi>

---

 fs/ecryptfs/inode.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/ecryptfs/inode.c b/fs/ecryptfs/inode.c
index efdd2b7..692419c 100644
--- a/fs/ecryptfs/inode.c
+++ b/fs/ecryptfs/inode.c
@@ -338,7 +338,7 @@ static struct dentry *ecryptfs_lookup(st
     struct vfsmount *lower_mnt;
     struct dentry *tlower_dentry = NULL;
     char *encoded_name;
-    unsigned int encoded_namelen;
+    int encoded_namelen;
     struct ecryptfs_crypt_stat *crypt_stat = NULL;
     char *page_virt = NULL;
     struct inode *lower_inode;
@@ -520,7 +520,7 @@ static int ecryptfs_symlink(struct inode
     struct dentry *lower_dir_dentry;
     umode_t mode;
     char *encoded_symname;
-    unsigned int encoded_symlen;
+    int encoded_symlen;
     struct ecryptfs_crypt_stat *crypt_stat = NULL;

     lower_dentry = ecryptfs_dentry_to_lower(dentry);



                 reply	other threads:[~2006-10-27  7:49 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4541B9E8.2030402@gmail.com \
    --to=mikukkon@gmail.com \
    --cc=akpm@osdl.org \
    --cc=ecryptfs-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox