sysctl: no need to check for eof twice
Let's only check for eof once after the fgets(). There's no point in checking EOF before the first read, and twice in each loop.
This commit is contained in:
parent
98bf5011fe
commit
4f14f2bb6f
|
@ -104,7 +104,7 @@ static int parse_file(OrderedHashmap *sysctl_options, const char *path, bool ign
|
|||
}
|
||||
|
||||
log_debug("Parsing %s", path);
|
||||
while (!feof(f)) {
|
||||
for (;;) {
|
||||
char l[LINE_MAX], *p, *value, *new_value, *property, *existing;
|
||||
void *v;
|
||||
int k;
|
||||
|
|
Loading…
Reference in a new issue