Skip to content

Commit

Permalink
Add const attribute to get_ordinal_suffix()
Browse files Browse the repository at this point in the history
Signed-off-by: DL6ER <dl6er@dl6er.de>
  • Loading branch information
DL6ER committed Jun 23, 2020
1 parent 0923d6b commit c4aff06
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/log.c
Expand Up @@ -181,7 +181,7 @@ const char __attribute__ ((malloc)) *get_FTL_version(void)
return FTLversion;
}

const char *get_ordinal_suffix(unsigned int number)
const char __attribute__ ((const)) *get_ordinal_suffix(unsigned int number)
{
if((number % 100) > 9 && (number % 100) < 20)
{
Expand Down
2 changes: 1 addition & 1 deletion src/log.h
Expand Up @@ -20,6 +20,6 @@ void format_memory_size(char *prefix, unsigned long long int bytes, double *form
const char *get_FTL_version(void) __attribute__ ((malloc));
void log_FTL_version(bool crashreport);
void get_timestr(char *timestring, const time_t timein);
const char *get_ordinal_suffix(unsigned int number);
const char *get_ordinal_suffix(unsigned int number) __attribute__ ((const));

#endif //LOG_H

1 comment on commit c4aff06

@pralor-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This commit has been mentioned on Pi-hole Userspace. There might be relevant details there:

https://discourse.pi-hole.net/t/feedback-for-allow-defining-clients-by-their-mac-address-host-name-and-networking-interface/32324/118

Please sign in to comment.