From fddad5f4a66a68682892e3fa7f22ec2689786d33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Tue, 17 May 2022 16:25:06 +0200 Subject: analyze: allow verbs to return positive failure No functional change is intended. The verbs where it wasn't immediately clear if the success exit status is 0 or >= 0 are changed to explicitly return 0. (I think it's better to be explicit than to rely on some call stack always returning 0 on success.) Some other functions are cleaned up to be more idiomatic. --- src/analyze/analyze-dump.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/analyze/analyze-dump.c') diff --git a/src/analyze/analyze-dump.c b/src/analyze/analyze-dump.c index 24094ce614..448ce09bd7 100644 --- a/src/analyze/analyze-dump.c +++ b/src/analyze/analyze-dump.c @@ -60,5 +60,9 @@ int verb_dump(int argc, char *argv[], void *userdata) { return bus_log_parse_error(r); fflush(stdout); - return copy_bytes(fd, STDOUT_FILENO, UINT64_MAX, 0); + r = copy_bytes(fd, STDOUT_FILENO, UINT64_MAX, 0); + if (r < 0) + return r; + + return EXIT_SUCCESS; } -- cgit v1.2.1