Skip to content

Commit

Permalink
Merge pull request #2131 from pi-hole/fix/123
Browse files Browse the repository at this point in the history
Remove duplicated code and silence a harmless warning
  • Loading branch information
DL6ER authored Dec 8, 2024
2 parents 707280c + d7b77b3 commit f4a209a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
5 changes: 5 additions & 0 deletions src/api/api.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,11 @@ static struct {

int api_handler(struct mg_connection *conn, void *ignored)
{
// Unused, but required by CivetWeb
// This is a no-op but suppresses the warning "unused parameter
// 'ignored'" on modern compilers
(void)ignored;

// Prepare API info struct
struct ftl_conn api = {
conn,
Expand Down
10 changes: 0 additions & 10 deletions src/database/database-thread.c
Original file line number Diff line number Diff line change
Expand Up @@ -220,16 +220,6 @@ void *DB_thread(void *val)
// Intermediate cancellation-point
BREAK_IF_KILLED();

// Import alias-clients
if(get_and_clear_event(REIMPORT_ALIASCLIENTS))
{
lock_shm();
reimport_aliasclients(db);
unlock_shm();
}

BREAK_IF_KILLED();

// Sleep 0.1 sec
thread_sleepms(DB, 100);
}
Expand Down

0 comments on commit f4a209a

Please sign in to comment.