Skip to content

Commit

Permalink
Merge pull request #406 from pi-hole/tweak/minor_optimizations
Browse files Browse the repository at this point in the history
Minor code optimizations
  • Loading branch information
AzureMarker authored Oct 27, 2018
2 parents 6880fbd + 560bca5 commit dd77cc4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dnsmasq_interface.c
Original file line number Diff line number Diff line change
Expand Up @@ -794,7 +794,7 @@ void print_flags(unsigned int flags)
unsigned int i;
char *flagstr = calloc(256,sizeof(char));
for(i = 0; i < sizeof(flags)*8; i++)
if(flags & (1 << i))
if(flags & (1u << i))
strcat(flagstr, flagnames[i]);
logg(" Flags: %s", flagstr);
free(flagstr);
Expand Down
2 changes: 1 addition & 1 deletion routines.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ char * getUserName(void);
void removepid(void);

void open_FTL_log(bool test);
void logg(const char* str, ...);
void logg(const char* format, ...);
void logg_struct_resize(const char* str, int to, int step);
void log_counter_info(void);
void format_memory_size(char *prefix, unsigned long int bytes, double *formated);
Expand Down

0 comments on commit dd77cc4

Please sign in to comment.