Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760700AbXIQV46 (ORCPT ); Mon, 17 Sep 2007 17:56:58 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1758230AbXIQV4p (ORCPT ); Mon, 17 Sep 2007 17:56:45 -0400 Received: from e34.co.us.ibm.com ([32.97.110.152]:58614 "EHLO e34.co.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933061AbXIQV4n (ORCPT ); Mon, 17 Sep 2007 17:56:43 -0400 Date: Mon, 17 Sep 2007 16:52:04 -0500 From: Michael Halcrow To: akpm@linux-foundation.org Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, ecryptfs-devel@lists.sourceforge.net Subject: [PATCH 11/11] eCryptfs: Replace magic numbers Message-ID: <20070917215204.GS13679@halcrow.austin.ibm.com> Reply-To: Michael Halcrow References: <20070917214436.GH13679@halcrow.austin.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070917214436.GH13679@halcrow.austin.ibm.com> User-Agent: Mutt/1.5.13 (2006-08-11) Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1202 Lines: 33 Replace some magic numbers with sizeof() equivalents. Signed-off-by: Michael Halcrow --- 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 3b3cf27..425a144 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; -- 1.5.1.6 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/