Skip to content

Removed unused init_lists() function that serves no purpose #3854

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Nov 20, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 0 additions & 20 deletions cores/esp8266/Schedule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,26 +14,6 @@ static scheduled_fn_t* sLastUnused = 0;

static int sCount = 0;

static void init_lists() __attribute__((unused));
static void init_lists()
{
if (sCount != 0) {
return;
}
while (sCount < SCHEDULED_FN_INITIAL_COUNT) {
scheduled_fn_t* it = new scheduled_fn_t;
if (sCount == 0) {
sFirstUnused = it;
}
else {
sLastUnused->mNext = it;
}
sLastUnused = it;
++sCount;
}
sLastUnused->mNext = NULL;
}

static scheduled_fn_t* get_fn() {
scheduled_fn_t* result = NULL;
// try to get an item from unused items list
Expand Down