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:
Lennart Poettering 2016-10-25 09:26:31 +02:00
parent 98bf5011fe
commit 4f14f2bb6f

View file

@ -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;