cgroup-util: replace one use of fgets() by read_line()
This commit is contained in:
parent
f4b51a2d09
commit
2351e44d3e
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue