mirror of
https://github.com/pi-hole/FTL.git
synced 2024-10-26 16:52:18 +02:00
get_blocked_statuslist() and get_cached_statuslist() are pure functions
Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
+2
-2
@@ -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;
|
||||
|
||||
+2
-2
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user