From b0cbde12a98264c2629b52f618678e7f1eacf097 Mon Sep 17 00:00:00 2001 From: Robert Spalek Date: Tue, 4 Jun 2002 08:51:37 +0000 Subject: [PATCH] CONST attribute of functions noted in a better place --- lib/hashfunc.c | 6 ++---- lib/hashfunc.h | 3 +-- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/lib/hashfunc.c b/lib/hashfunc.c index 631a0bbe..980b4077 100644 --- a/lib/hashfunc.c +++ b/lib/hashfunc.c @@ -34,9 +34,7 @@ hashfunc_init(void) } } -static inline uns str_len_uns(uns x) CONST; - -static inline uns +static inline uns CONST str_len_uns(uns x) { const uns sub = ((uns) -1) / 0xff; @@ -49,7 +47,7 @@ str_len_uns(uns x) * x_3 = x ^ x_2; * a = x_3 & 0x80808080; * - * If none byte of x is in {0, 0x80}, then the highest bit of each byte + * If no byte of x is in {0, 0x80}, then the highest bit of each byte * of x_2 is the same as of x. Hence x_3 has all these highest bits * cleared. If a == 0, then we are sure there is no zero byte in x. */ diff --git a/lib/hashfunc.h b/lib/hashfunc.h index 1767d81b..d79e44ec 100644 --- a/lib/hashfunc.h +++ b/lib/hashfunc.h @@ -30,7 +30,6 @@ uns hash_block(const byte *str, uns len) CONST; uns hash_string_nocase(const byte *str) CONST; -static inline uns hash_int(uns x) CONST; -static inline uns hash_int(uns x) { return 6442450967*x; } +static inline uns CONST hash_int(uns x) { return 6442450967*x; } #endif -- 2.39.2