diff options
author | Anton Lindqvist <anton@cvs.openbsd.org> | 2024-08-23 12:56:27 +0000 |
---|---|---|
committer | Anton Lindqvist <anton@cvs.openbsd.org> | 2024-08-23 12:56:27 +0000 |
commit | 88a374a4ea682237847f106063cfd5c9413a7e46 (patch) | |
tree | 8793341b9f79ef4707495e7425b4b56224e6cae4 /regress/sys | |
parent | 30c7e9e0cb0ce86c6623cbb6e19c62c01f7ee29b (diff) |
Remove unwanted trailing newlines from err/warn format strings.
Diffstat (limited to 'regress/sys')
-rw-r--r-- | regress/sys/arch/amd64/vmm/vcpu.c | 6 | ||||
-rw-r--r-- | regress/sys/dev/kcov/kcov.c | 10 | ||||
-rw-r--r-- | regress/sys/kern/cmsgsize/cmsgsize.c | 6 | ||||
-rw-r--r-- | regress/sys/kern/getpeereid/getpeereid_test.c | 7 | ||||
-rw-r--r-- | regress/sys/kern/signal/sig-stop/sig-stop.c | 4 | ||||
-rw-r--r-- | regress/sys/kern/unveil/syscalls.c | 4 | ||||
-rw-r--r-- | regress/sys/net/rtable/util.c | 16 |
7 files changed, 27 insertions, 26 deletions
diff --git a/regress/sys/arch/amd64/vmm/vcpu.c b/regress/sys/arch/amd64/vmm/vcpu.c index 2c7287142a2..5906e8ea915 100644 --- a/regress/sys/arch/amd64/vmm/vcpu.c +++ b/regress/sys/arch/amd64/vmm/vcpu.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vcpu.c,v 1.7 2024/04/09 21:55:16 dv Exp $ */ +/* $OpenBSD: vcpu.c,v 1.8 2024/08/23 12:56:26 anton Exp $ */ /* * Copyright (c) 2022 Dave Voutila <dv@openbsd.org> @@ -253,7 +253,7 @@ main(int argc, char **argv) } } if (ours == NULL) { - warn("failed to find vm %uz\n", vcp.vcp_id); + warn("failed to find vm %uz", vcp.vcp_id); goto out; } @@ -306,7 +306,7 @@ main(int argc, char **argv) } if (vrunp.vrp_vm_id != vcp.vcp_id) { - warnx("expected vm id %uz, got %uz\n", vcp.vcp_id, + warnx("expected vm id %uz, got %uz", vcp.vcp_id, vrunp.vrp_vm_id); goto out; } diff --git a/regress/sys/dev/kcov/kcov.c b/regress/sys/dev/kcov/kcov.c index 7a5142ef875..7d225606bda 100644 --- a/regress/sys/dev/kcov/kcov.c +++ b/regress/sys/dev/kcov/kcov.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kcov.c,v 1.17 2022/01/11 06:01:15 anton Exp $ */ +/* $OpenBSD: kcov.c,v 1.18 2024/08/23 12:56:26 anton Exp $ */ /* * Copyright (c) 2018 Anton Lindqvist <anton@openbsd.org> @@ -197,20 +197,20 @@ check_coverage(const unsigned long *cover, int mode, unsigned long maxsize, if (nonzero == -1) { return 0; } else if (nonzero && cover[0] == 0) { - warnx("coverage empty (count=0)\n"); + warnx("coverage empty (count=0)"); return 1; } else if (!nonzero && cover[0] != 0) { - warnx("coverage not empty (count=%lu)\n", *cover); + warnx("coverage not empty (count=%lu)", *cover); return 1; } else if (cover[0] >= maxsize) { - warnx("coverage overflow (count=%lu, max=%lu)\n", + warnx("coverage overflow (count=%lu, max=%lu)", *cover, maxsize); return 1; } if (mode == KCOV_MODE_TRACE_CMP) { if (*cover * 4 >= maxsize) { - warnx("coverage cmp overflow (count=%lu, max=%lu)\n", + warnx("coverage cmp overflow (count=%lu, max=%lu)", *cover * 4, maxsize); return 1; } diff --git a/regress/sys/kern/cmsgsize/cmsgsize.c b/regress/sys/kern/cmsgsize/cmsgsize.c index 0a37847fc46..b5510c196b5 100644 --- a/regress/sys/kern/cmsgsize/cmsgsize.c +++ b/regress/sys/kern/cmsgsize/cmsgsize.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmsgsize.c,v 1.3 2020/01/22 07:52:37 deraadt Exp $ */ +/* $OpenBSD: cmsgsize.c,v 1.4 2024/08/23 12:56:26 anton Exp $ */ /* * Copyright (c) 2017 Alexander Markert <alexander.markert@siemens.com> * Copyright (c) 2018 Alexander Bluhm <bluhm@openbsd.org> @@ -58,7 +58,7 @@ main(int argc, char *argv[]) bytes = test_cmsgsize(so, &src, &dst, CFG_SO_MAX_SEND_BUFFER, CFG_SO_MAX_SEND_BUFFER); if (bytes >= 0) - errx(1, "1: %d bytes sent\n", bytes); + errx(1, "1: %d bytes sent", bytes); if (errno != EMSGSIZE) err(-1, "1: incorrect errno"); close(so); @@ -70,7 +70,7 @@ main(int argc, char *argv[]) bytes = test_cmsgsize(so, &src, &dst, CFG_SO_MAX_SEND_BUFFER, CFG_SO_MAX_SEND_BUFFER); if (bytes >= 0) - errx(1, "2: %d bytes sent\n", bytes); + errx(1, "2: %d bytes sent", bytes); if (errno != EMSGSIZE) err(-1, "2: incorrect errno"); close(so); diff --git a/regress/sys/kern/getpeereid/getpeereid_test.c b/regress/sys/kern/getpeereid/getpeereid_test.c index 8363d33143b..94d9cacb054 100644 --- a/regress/sys/kern/getpeereid/getpeereid_test.c +++ b/regress/sys/kern/getpeereid/getpeereid_test.c @@ -1,4 +1,4 @@ -/* $OpenBSD: getpeereid_test.c,v 1.4 2017/03/08 19:28:47 deraadt Exp $ */ +/* $OpenBSD: getpeereid_test.c,v 1.5 2024/08/23 12:56:26 anton Exp $ */ /* Written by Marc Espie in 2006 */ /* Public domain */ #include <sys/types.h> @@ -142,7 +142,8 @@ main() if (WIFEXITED(status) && WEXITSTATUS(status) == 0) { printf("getpeereid test okay\n"); exit(0); - } else - errx(1, "Problem with child\n"); + } else { + errx(1, "Problem with child"); + } } } diff --git a/regress/sys/kern/signal/sig-stop/sig-stop.c b/regress/sys/kern/signal/sig-stop/sig-stop.c index 7f2d414e7f2..937592186a8 100644 --- a/regress/sys/kern/signal/sig-stop/sig-stop.c +++ b/regress/sys/kern/signal/sig-stop/sig-stop.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sig-stop.c,v 1.1 2020/09/16 14:02:23 mpi Exp $ */ +/* $OpenBSD: sig-stop.c,v 1.2 2024/08/23 12:56:26 anton Exp $ */ /* * Written by Artur Grabowski <art@openbsd.org> 2007 Public Domain. */ @@ -51,7 +51,7 @@ main(int argc, char **argv) (toggle ? WIFSTOPPED(status) : WIFCONTINUED(status))); if (!WIFEXITED(status)) - err(1, "bad status: %d\n", status); + err(1, "bad status: %d", status); return 0; } diff --git a/regress/sys/kern/unveil/syscalls.c b/regress/sys/kern/unveil/syscalls.c index 6a63349e076..0899aa9f3b2 100644 --- a/regress/sys/kern/unveil/syscalls.c +++ b/regress/sys/kern/unveil/syscalls.c @@ -1,4 +1,4 @@ -/* $OpenBSD: syscalls.c,v 1.35 2022/09/05 05:34:25 anton Exp $ */ +/* $OpenBSD: syscalls.c,v 1.36 2024/08/23 12:56:26 anton Exp $ */ /* * Copyright (c) 2017-2019 Bob Beck <beck@openbsd.org> @@ -867,7 +867,7 @@ test_fork_locked(int do_uv) status = 0; waitpid(pid, &status, 0); if (WIFSIGNALED(status)) - errx(1, "child exited with signal %d\n", WTERMSIG(status)); + errx(1, "child exited with signal %d", WTERMSIG(status)); if (WEXITSTATUS(status) == 0) return 0; else diff --git a/regress/sys/net/rtable/util.c b/regress/sys/net/rtable/util.c index fc17db19aca..1d4c52b642a 100644 --- a/regress/sys/net/rtable/util.c +++ b/regress/sys/net/rtable/util.c @@ -1,4 +1,4 @@ -/* $OpenBSD: util.c,v 1.14 2023/11/11 07:34:54 anton Exp $ */ +/* $OpenBSD: util.c,v 1.15 2024/08/23 12:56:26 anton Exp $ */ /* * Copyright (c) 2015 Martin Pieuchot @@ -130,12 +130,12 @@ route_insert(unsigned int rid, sa_family_t af, char *string) if ((error = rtable_insert(rid, ndst, mask, NULL, 0, rt)) != 0) { inet_net_satop(af, ndst, plen, ip, sizeof(ip)); - errx(1, "can't add route: %s, %s\n", ip, strerror(error)); + errx(1, "can't add route: %s, %s", ip, strerror(error)); } nrt = rtable_lookup(rid, dst, mask, NULL, RTP_ANY); if (nrt != rt) { inet_net_satop(af, rt_key(rt), plen, ip, sizeof(ip)); - errx(1, "added route not found: %s\n", ip); + errx(1, "added route not found: %s", ip); } rtfree(rt); rtfree(nrt); @@ -161,7 +161,7 @@ route_delete(unsigned int rid, sa_family_t af, char *string) rt = rtable_lookup(0, dst, mask, NULL, RTP_ANY); if (rt == NULL) { inet_net_satop(af, dst, plen, ip, sizeof(ip)); - errx(1, "can't find route: %s\n", ip); + errx(1, "can't find route: %s", ip); } assert(memcmp(rt_key(rt), dst, dst->sa_len) == 0); @@ -169,7 +169,7 @@ route_delete(unsigned int rid, sa_family_t af, char *string) if ((error = rtable_delete(0, dst, mask, rt)) != 0) { inet_net_satop(af, dst, plen, ip, sizeof(ip)); - errx(1, "can't rm route: %s, %s\n", ip, strerror(error)); + errx(1, "can't rm route: %s, %s", ip, strerror(error)); } nrt = rtable_lookup(0, dst, mask, NULL, RTP_ANY); @@ -207,7 +207,7 @@ route_lookup(unsigned int rid, sa_family_t af, char *string) rt = rtable_lookup(0, dst, mask, NULL, RTP_ANY); if (rt == NULL) { inet_net_satop(af, dst, plen, ip, sizeof(ip)); - errx(1, "%s not found\n", ip); + errx(1, "%s not found", ip); } assert(memcmp(rt_key(rt), dst, dst->sa_len) == 0); assert(rt_plen(rt) == rtable_satoplen(af, mask)); @@ -225,7 +225,7 @@ do_from_file(unsigned int rid, sa_family_t af, char *filename, int lines = 0; if ((fp = fopen(filename, "r")) == NULL) - errx(1, "No such file: %s\n", filename); + errx(1, "No such file: %s", filename); while ((buf = fgetln(fp, &len)) != NULL) { if (buf[len - 1] == '\n') @@ -264,7 +264,7 @@ rtentry_delete(struct rtentry *rt, void *w, unsigned int rid) if ((error = rtable_delete(0, rt_key(rt), mask, rt)) != 0) { inet_net_satop(af, rt_key(rt), rt_plen(rt), dest, sizeof(dest)); - errx(1, "can't rm route: %s, %s\n", dest, strerror(error)); + errx(1, "can't rm route: %s, %s", dest, strerror(error)); } assert(refcnt_read(&rt->rt_refcnt) == 0); |