mirror of
https://github.com/systemd/systemd.git
synced 2024-11-02 10:51:20 +03:00
cgtop: fgets() excorcism
This commit is contained in:
parent
741d2cb533
commit
717e419b35
@ -343,10 +343,14 @@ static int process(
|
||||
}
|
||||
|
||||
for (;;) {
|
||||
char line[LINE_MAX], *l;
|
||||
_cleanup_free_ char *line = NULL;
|
||||
uint64_t k, *q;
|
||||
char *l;
|
||||
|
||||
if (!fgets(line, sizeof(line), f))
|
||||
r = read_line(f, LONG_LINE_MAX, &line);
|
||||
if (r < 0)
|
||||
return r;
|
||||
if (r == 0)
|
||||
break;
|
||||
|
||||
/* Trim and skip the device */
|
||||
|
Loading…
Reference in New Issue
Block a user