Browse Source

[core] mark some more funcs w/ __attribute_pure__

personal/stbuehler/ci-build
Glenn Strauss 3 years ago
parent
commit
49ed72cef4
  1. 1
      src/http_header.h
  2. 2
      src/stat_cache.c

1
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);

2
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 */

Loading…
Cancel
Save