From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from waste.org ([64.81.244.121]:4816 "EHLO waste.org") by vger.kernel.org with ESMTP id S1030263AbVLVS1y (ORCPT ); Thu, 22 Dec 2005 13:27:54 -0500 Date: Thu, 22 Dec 2005 12:26:36 -0600 From: Matt Mackall In-Reply-To: <7.150843412@selenic.com> Message-Id: <8.150843412@selenic.com> Subject: [PATCH 7/20] inflate: eliminate memzero usage Sender: linux-arch-owner@vger.kernel.org To: Andrew Morton Cc: linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, linux-tiny@selenic.com List-ID: inflate: replace call to memzero with simple loop This is the only user of memzero in the inflate code and it's only for 16 bytes. Removing this lets us drop a copy of memzero from most lib/inflate users. Signed-off-by: Matt Mackall Index: 2.6.14/lib/inflate.c =================================================================== --- 2.6.14.orig/lib/inflate.c 2005-10-31 12:21:21.000000000 -0800 +++ 2.6.14/lib/inflate.c 2005-10-31 12:21:22.000000000 -0800 @@ -365,8 +365,10 @@ static int INIT huft_build(unsigned *b, DEBG("huft1 "); + for (i = 0; i < BMAX + 1; i++) + c[i] = 0; + /* Generate counts for each bit length */ - memzero(c, sizeof(c)); p = b; i = n; do {