get_blocked_statuslist() and get_cached_statuslist() are pure functions

Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
DL6ER 2023-05-27 20:49:49 +02:00
parent 87a1e4a2de
commit 38c7372b1d
No known key found for this signature in database
GPG Key ID: 00135ACBD90B28DD
2 changed files with 4 additions and 4 deletions

View File

@ -781,7 +781,7 @@ bool __attribute__ ((const)) is_blocked(const enum query_status status)
}
static char blocked_list[32] = { 0 };
const char * __attribute__ ((const)) get_blocked_statuslist(void)
const char * __attribute__ ((pure)) get_blocked_statuslist(void)
{
if(blocked_list[0] != '\0')
return blocked_list;
@ -804,7 +804,7 @@ const char * __attribute__ ((const)) get_blocked_statuslist(void)
}
static char cached_list[32] = { 0 };
const char * __attribute__ ((const)) get_cached_statuslist(void)
const char * __attribute__ ((pure)) get_cached_statuslist(void)
{
if(cached_list[0] != '\0')
return cached_list;

View File

@ -130,8 +130,8 @@ bool isValidIPv6(const char *addr);
bool is_blocked(const enum query_status status) __attribute__ ((const));
bool is_cached(const enum query_status status) __attribute__ ((const));
const char *get_blocked_statuslist(void) __attribute__ ((const));
const char *get_cached_statuslist(void) __attribute__ ((const));
const char *get_blocked_statuslist(void) __attribute__ ((pure));
const char *get_cached_statuslist(void) __attribute__ ((pure));
int get_blocked_count(void) __attribute__ ((pure));
int get_forwarded_count(void) __attribute__ ((pure));
int get_cached_count(void) __attribute__ ((pure));