Skip to content
Snippets Groups Projects
Commit bd490819 authored by dx's avatar dx
Browse files

style(config): lightly flatten the loops of load_config

Mostly changing things like if { ... return} else { ... } to not have
an extra indentation level of the else part.

The diff is probably very weird even with stripped whitespace.
parent 8a2de29e
Branches
No related tags found
No related merge requests found
......@@ -293,7 +293,8 @@ void load_config(void)
*eol = '\0';
doline(line, eol, lineNumber);
line = eol + 1;
} else {
continue;
}
if (line == buf) {
//line did not fit into buf
LOG_WARN(
......@@ -302,7 +303,7 @@ void load_config(void)
lineNumber
);
return;
} else {
}
int seek_back = last_eol - nread;
LOG_DEBUG(
"card10.cfg",
......@@ -312,7 +313,9 @@ void load_config(void)
seek_back
);
assert(seek_back <= 0);
if (seek_back) {
if (!seek_back) {
break;
}
int rc = epic_file_seek(
fd,
seek_back,
......@@ -338,11 +341,8 @@ void load_config(void)
);
return;
}
}
break;
}
}
}
} while (nread == sizeof(buf));
epic_file_close(fd);
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment