cgroup-util: replace one use of fgets() by read_line()

This commit is contained in:
Lennart Poettering 2017-09-22 18:25:45 +02:00
parent f4b51a2d09
commit 2351e44d3e
1 changed files with 1 additions and 2 deletions

View File

@ -2326,7 +2326,6 @@ int cg_mask_supported(CGroupMask *ret) {
int cg_kernel_controllers(Set *controllers) {
_cleanup_fclose_ FILE *f = NULL;
char buf[LINE_MAX];
int r;
assert(controllers);
@ -2344,7 +2343,7 @@ int cg_kernel_controllers(Set *controllers) {
}
/* Ignore the header line */
(void) fgets(buf, sizeof(buf), f);
(void) read_line(f, (size_t) -1, NULL);
for (;;) {
char *controller;