From: Robert Spalek Date: Tue, 4 Jun 2002 08:51:37 +0000 (+0000) Subject: CONST attribute of functions noted in a better place X-Git-Tag: holmes-import~1405 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=b0cbde12a98264c2629b52f618678e7f1eacf097;p=libucw.git CONST attribute of functions noted in a better place --- 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