From 3d8e2000fd551b709c4e54f978a63c62d13b7469 Mon Sep 17 00:00:00 2001 From: Rodrigo Arias Date: Fri, 24 Mar 2023 12:50:48 +0100 Subject: [PATCH] Don't use err() for non-error messages --- src/emu/ovni/event.c | 2 +- src/emu/ovnisort.c | 15 +++++++-------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/src/emu/ovni/event.c b/src/emu/ovni/event.c index 9d197fd..430d5cf 100644 --- a/src/emu/ovni/event.c +++ b/src/emu/ovni/event.c @@ -346,7 +346,7 @@ pre_cpu(struct emu *emu) { switch (emu->ev->v) { case 'n': - err("ignoring old event OCn"); + warn("ignoring old event OCn"); return 0; default: err("unknown cpu event value %c", diff --git a/src/emu/ovnisort.c b/src/emu/ovnisort.c index e7c0b47..39af870 100644 --- a/src/emu/ovnisort.c +++ b/src/emu/ovnisort.c @@ -367,7 +367,7 @@ process_trace(struct trace *trace) } } else { if (stream_check(stream) != 0) { - err("stream %s is not sorted", stream->relpath); + info("stream %s is not sorted", stream->relpath); /* When checking, report all errors and * then fail */ ret = -1; @@ -379,9 +379,9 @@ process_trace(struct trace *trace) if (operation_mode == CHECK) { if (ret == 0) { - err("all streams sorted"); + info("all streams sorted"); } else { - err("streams NOT sorted"); + info("streams NOT sorted"); } } @@ -458,13 +458,12 @@ main(int argc, char *argv[]) return 1; } - if (process_trace(trace) != 0) { - err("failed to process trace: %s", tracedir); - return 1; - } - + int ret = process_trace(trace); free(trace); + if (ret) + return 1; + return 0; }