[PATCH 7/7] inflate pt1: eliminate memzero usage

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <[email protected]>

Index: 2.6.16-rc4-inflate/lib/inflate.c
===================================================================
--- 2.6.16-rc4-inflate.orig/lib/inflate.c	2006-02-22 17:16:10.000000000 -0600
+++ 2.6.16-rc4-inflate/lib/inflate.c	2006-02-22 17:16:12.000000000 -0600
@@ -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 {
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux