summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlenn Strauss <gstrauss@gluelogic.com>2019-06-04 21:20:52 -0400
committerGlenn Strauss <gstrauss@gluelogic.com>2019-06-06 02:48:43 -0400
commit49ed72cef4cfaeb721f10fc18e45056b0129f3e0 (patch)
treec4a0f1b1e6dc90326a10ff62b230f75196d256ac
parentac8444f2e6c0a49f31e000ca001462190dcecca7 (diff)
downloadlighttpd1.4-49ed72cef4cfaeb721f10fc18e45056b0129f3e0.zip
lighttpd1.4-49ed72cef4cfaeb721f10fc18e45056b0129f3e0.tar.gz
[core] mark some more funcs w/ __attribute_pure__
-rw-r--r--src/http_header.h1
-rw-r--r--src/stat_cache.c2
2 files changed, 3 insertions, 0 deletions
diff --git a/src/http_header.h b/src/http_header.h
index f19d1d9..0c82f44 100644
--- a/src/http_header.h
+++ b/src/http_header.h
@@ -39,6 +39,7 @@ enum http_header_e {
,HTTP_HEADER_X_FORWARDED_PROTO = 0x04000000
};
+__attribute_pure__
enum http_header_e http_header_hkey_get(const char *s, size_t slen);
buffer * http_header_response_get(connection *con, enum http_header_e id, const char *k, size_t klen);
diff --git a/src/stat_cache.c b/src/stat_cache.c
index eeef8d2..4e7ebf3 100644
--- a/src/stat_cache.c
+++ b/src/stat_cache.c
@@ -53,6 +53,7 @@ typedef struct stat_cache {
/* the famous DJB hash function for strings */
+__attribute_pure__
static uint32_t djbhash(const char *str, const size_t len)
{
const unsigned char * const s = (const unsigned char *)str;
@@ -62,6 +63,7 @@ static uint32_t djbhash(const char *str, const size_t len)
}
+__attribute_pure__
static uint32_t hashme(const char *str, const size_t len)
{
/* strip highest bit of hash value for splaytree */