Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=ecbdc93639f69c1f237ccce6a9aaff1e83f1182f
Commit:     ecbdc93639f69c1f237ccce6a9aaff1e83f1182f
Parent:     b6c1d8fcbadeb9bb4c3dbca57a007629d0483544
Author:     Michael Halcrow <[EMAIL PROTECTED]>
AuthorDate: Tue Oct 16 01:28:14 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Tue Oct 16 09:43:12 2007 -0700

    eCryptfs: replace magic numbers
    
    Replace some magic numbers with sizeof() equivalents.
    
    Signed-off-by: Michael Halcrow <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 fs/ecryptfs/crypto.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/fs/ecryptfs/crypto.c b/fs/ecryptfs/crypto.c
index a9ca373..e890d59 100644
--- a/fs/ecryptfs/crypto.c
+++ b/fs/ecryptfs/crypto.c
@@ -1426,10 +1426,10 @@ static int parse_header_metadata(struct 
ecryptfs_crypt_stat *crypt_stat,
        u32 header_extent_size;
        u16 num_header_extents_at_front;
 
-       memcpy(&header_extent_size, virt, 4);
+       memcpy(&header_extent_size, virt, sizeof(u32));
        header_extent_size = be32_to_cpu(header_extent_size);
-       virt += 4;
-       memcpy(&num_header_extents_at_front, virt, 2);
+       virt += sizeof(u32);
+       memcpy(&num_header_extents_at_front, virt, sizeof(u16));
        num_header_extents_at_front = be16_to_cpu(num_header_extents_at_front);
        crypt_stat->num_header_extents_at_front =
                (int)num_header_extents_at_front;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to