diff options
author | Lennart Poettering <lennart@poettering.net> | 2023-03-24 18:25:13 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2023-03-24 18:30:20 +0100 |
commit | 50ed5cbf5f305d331a2f72a389cb39c9e670286c (patch) | |
tree | af95aa135f518d372ccb56c8d19c7669ab636837 /src/import | |
parent | 7b82d95f8d867958be648cc0027bf36d3f558e41 (diff) | |
download | systemd-50ed5cbf5f305d331a2f72a389cb39c9e670286c.tar.gz |
tree-wide: port various places to find_line_startswith()
Diffstat (limited to 'src/import')
-rw-r--r-- | src/import/importd.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/import/importd.c b/src/import/importd.c index ed757019cf..4675aa5a61 100644 --- a/src/import/importd.c +++ b/src/import/importd.c @@ -590,14 +590,9 @@ static int manager_on_notify(sd_event_source *s, int fd, uint32_t revents, void buf[n] = 0; - p = startswith(buf, "X_IMPORT_PROGRESS="); - if (!p) { - p = strstr(buf, "\nX_IMPORT_PROGRESS="); - if (!p) - return 0; - - p += 19; - } + p = find_line_startswith(buf, "X_IMPORT_PROGRESS="); + if (!p) + return 0; e = strchrnul(p, '\n'); *e = 0; |