From 07195b03ecd327ae5a830ad66047c054f2be450b Mon Sep 17 00:00:00 2001 From: Marko Kreen Date: Wed, 21 Nov 2007 15:59:00 +0000 Subject: [PATCH] hash: remove the silly optimization, its better to keep code clean --- src/hash.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/src/hash.c b/src/hash.c index c153129..1712a17 100644 --- a/src/hash.c +++ b/src/hash.c @@ -56,16 +56,6 @@ c ^= b; c -= rot(b,24); \ } while (0) -/* for a small amount of bytes the call to libc is a loss */ -static inline void simple_memcpy(void *dst, const void *src, size_t n) -{ - const uint8_t *s = src; - uint8_t *d = dst; - - while (n--) - *d++ = *s++; -} - /* short version - let compiler worry about memory access */ uint32_t lookup3_hash(const void *data, size_t len) { @@ -88,7 +78,7 @@ uint32_t lookup3_hash(const void *data, size_t len) } buf[0] = buf[1] = buf[2] = 0; - simple_memcpy(buf, p, len); + memcpy(buf, p, len); a += buf[0]; b += buf[1]; c += buf[2]; -- 2.40.0