mirror of
https://github.com/systemd/systemd.git
synced 2026-08-02 22:20:20 +00:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user