From 0ff6ff2b29dfb02a803515fb0160d9963d2389d5 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Mon, 16 Oct 2023 18:01:00 +0200 Subject: tree-wide: port various parsers over to read_stripped_line() --- src/cgtop/cgtop.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/cgtop') diff --git a/src/cgtop/cgtop.c b/src/cgtop/cgtop.c index 2e517a1636..a6adb8ce31 100644 --- a/src/cgtop/cgtop.c +++ b/src/cgtop/cgtop.c @@ -298,15 +298,14 @@ static int process( uint64_t k, *q; char *l; - r = read_line(f, LONG_LINE_MAX, &line); + r = read_stripped_line(f, LONG_LINE_MAX, &line); if (r < 0) return r; if (r == 0) break; - /* Trim and skip the device */ - l = strstrip(line); - l += strcspn(l, WHITESPACE); + /* Skip the device */ + l = line + strcspn(line, WHITESPACE); l += strspn(l, WHITESPACE); if (all_unified) { -- cgit v1.2.3