From: anton Date: Fri, 23 Aug 2024 12:56:26 +0000 (+0000) Subject: Remove unwanted trailing newlines from err/warn format strings. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=6822f9c8033774f6aab00bcb43e8718e7034e67d;p=openbsd Remove unwanted trailing newlines from err/warn format strings. --- diff --git a/regress/lib/libcrypto/bn/bn_mod_sqrt.c b/regress/lib/libcrypto/bn/bn_mod_sqrt.c index 7ab79051365..345ab4cb614 100644 --- a/regress/lib/libcrypto/bn/bn_mod_sqrt.c +++ b/regress/lib/libcrypto/bn/bn_mod_sqrt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bn_mod_sqrt.c,v 1.10 2023/04/11 10:10:52 tb Exp $ */ +/* $OpenBSD: bn_mod_sqrt.c,v 1.11 2024/08/23 12:56:26 anton Exp $ */ /* * Copyright (c) 2022,2023 Theo Buehler @@ -2865,7 +2865,7 @@ mod_sqrt_test(struct mod_sqrt_test *test, BN_CTX *ctx) if (!BN_hex2bn(&want, test->sqrt)) errx(1, "BN_hex2bn(%s)", test->sqrt); if (!BN_mod_sub(diff, want, got, p, ctx)) - errx(1, "BN_mod_sub() failed\n"); + errx(1, "BN_mod_sub() failed"); if (!BN_is_zero(diff)) { fprintf(stderr, "a: %s\n", test->a); diff --git a/regress/lib/libcrypto/bn/bn_word.c b/regress/lib/libcrypto/bn/bn_word.c index 0a543add972..2ec518ed1b6 100644 --- a/regress/lib/libcrypto/bn/bn_word.c +++ b/regress/lib/libcrypto/bn/bn_word.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bn_word.c,v 1.1 2023/03/11 14:04:21 jsing Exp $ */ +/* $OpenBSD: bn_word.c,v 1.2 2024/08/23 12:56:26 anton Exp $ */ /* * Copyright (c) 2023 Joel Sing * @@ -51,7 +51,7 @@ check_bn_word_test(const char *op_name, const BIGNUM *bn, } if ((out_hex = BN_bn2hex(bn)) == NULL) - errx(1, "BN_bn2hex() failed\n"); + errx(1, "BN_bn2hex() failed"); if (strcmp(out_hex, bwt->out_hex) != 0) { fprintf(stderr, "FAIL %s: Got hex %s, want %s\n", @@ -82,7 +82,7 @@ test_bn_word(int (*bn_word_op)(BIGNUM *, BN_ULONG), const char *op_name, int failed = 0; if ((bn = BN_new()) == NULL) - errx(1, "BN_new() failed\n"); + errx(1, "BN_new() failed"); for (i = 0; i < num_tests; i++) { bwt = &bwts[i]; @@ -428,7 +428,7 @@ test_bn_div_word(void) int failed = 0; if ((bn = BN_new()) == NULL) - errx(1, "BN_new() failed\n"); + errx(1, "BN_new() failed"); for (i = 0; i < N_BN_DIV_WORD_TESTS; i++) { bwt = &bn_div_word_tests[i]; @@ -574,7 +574,7 @@ test_bn_mod_word(void) int failed = 0; if ((bn = BN_new()) == NULL) - errx(1, "BN_new() failed\n"); + errx(1, "BN_new() failed"); for (i = 0; i < N_BN_MOD_WORD_TESTS; i++) { bwt = &bn_mod_word_tests[i]; diff --git a/regress/lib/libcrypto/x509/callback.c b/regress/lib/libcrypto/x509/callback.c index a01ffd5d6f2..c4d1575ae85 100644 --- a/regress/lib/libcrypto/x509/callback.c +++ b/regress/lib/libcrypto/x509/callback.c @@ -1,4 +1,4 @@ -/* $OpenBSD: callback.c,v 1.4 2023/01/28 19:12:20 tb Exp $ */ +/* $OpenBSD: callback.c,v 1.5 2024/08/23 12:56:26 anton Exp $ */ /* * Copyright (c) 2020 Joel Sing * Copyright (c) 2020-2021 Bob Beck @@ -158,7 +158,7 @@ verify_cert(const char *roots_dir, const char *roots_file, verify_err = X509_STORE_CTX_get_error(xsc); if (verify_err == 0) - errx(1, "Error unset on failure!\n"); + errx(1, "Error unset on failure!"); fprintf(stderr, "failed to verify at %d: %s\n", X509_STORE_CTX_get_error_depth(xsc), diff --git a/regress/lib/libcrypto/x509/callbackfailures.c b/regress/lib/libcrypto/x509/callbackfailures.c index 53570e15325..92301221467 100644 --- a/regress/lib/libcrypto/x509/callbackfailures.c +++ b/regress/lib/libcrypto/x509/callbackfailures.c @@ -1,4 +1,4 @@ -/* $OpenBSD: callbackfailures.c,v 1.2 2023/01/28 19:12:20 tb Exp $ */ +/* $OpenBSD: callbackfailures.c,v 1.3 2024/08/23 12:56:26 anton Exp $ */ /* * Copyright (c) 2020 Joel Sing * Copyright (c) 2020-2021 Bob Beck @@ -167,7 +167,7 @@ verify_cert(const char *roots_dir, const char *roots_file, verify_err = X509_STORE_CTX_get_error(xsc); if (verify_err == 0) - errx(1, "Error unset on failure!\n"); + errx(1, "Error unset on failure!"); fprintf(stderr, "failed to verify at %d: %s\n", X509_STORE_CTX_get_error_depth(xsc), diff --git a/regress/lib/libcrypto/x509/expirecallback.c b/regress/lib/libcrypto/x509/expirecallback.c index 88cef6fd019..bd3f568f869 100644 --- a/regress/lib/libcrypto/x509/expirecallback.c +++ b/regress/lib/libcrypto/x509/expirecallback.c @@ -1,4 +1,4 @@ -/* $OpenBSD: expirecallback.c,v 1.3 2023/01/28 19:12:20 tb Exp $ */ +/* $OpenBSD: expirecallback.c,v 1.4 2024/08/23 12:56:26 anton Exp $ */ /* * Copyright (c) 2020 Joel Sing * Copyright (c) 2020-2021 Bob Beck @@ -172,7 +172,7 @@ verify_cert(const char *roots_dir, const char *roots_file, } if (*error == 0) - errx(1, "Error unset on failure!\n"); + errx(1, "Error unset on failure!"); fprintf(stderr, "failed to verify at %d: %s\n", *error_depth, X509_verify_cert_error_string(*error)); diff --git a/regress/lib/libcrypto/x509/policy/policy.c b/regress/lib/libcrypto/x509/policy/policy.c index f5c9700b2b9..17ac78dd237 100644 --- a/regress/lib/libcrypto/x509/policy/policy.c +++ b/regress/lib/libcrypto/x509/policy/policy.c @@ -1,4 +1,4 @@ -/* $OpenBSD: policy.c,v 1.12 2023/06/02 08:35:10 tb Exp $ */ +/* $OpenBSD: policy.c,v 1.13 2024/08/23 12:56:26 anton Exp $ */ /* * Copyright (c) 2020 Joel Sing * Copyright (c) 2020-2023 Bob Beck @@ -182,7 +182,7 @@ verify_cert(const char *roots_file, const char *intermediate_file, } if (*error == 0) - errx(1, "Error unset on failure!\n"); + errx(1, "Error unset on failure!"); fprintf(stderr, "failed to verify at %d: %s\n", *error_depth, X509_verify_cert_error_string(*error)); diff --git a/regress/lib/libcrypto/x509/verify.c b/regress/lib/libcrypto/x509/verify.c index e49180f7f19..b4b4e06cf73 100644 --- a/regress/lib/libcrypto/x509/verify.c +++ b/regress/lib/libcrypto/x509/verify.c @@ -1,4 +1,4 @@ -/* $OpenBSD: verify.c,v 1.11 2023/01/28 19:12:20 tb Exp $ */ +/* $OpenBSD: verify.c,v 1.12 2024/08/23 12:56:26 anton Exp $ */ /* * Copyright (c) 2020 Joel Sing * Copyright (c) 2020-2021 Bob Beck @@ -162,7 +162,7 @@ verify_cert(const char *roots_dir, const char *roots_file, } if (*error == 0) - errx(1, "Error unset on failure!\n"); + errx(1, "Error unset on failure!"); fprintf(stderr, "failed to verify at %d: %s\n", *error_depth, X509_verify_cert_error_string(*error)); diff --git a/regress/lib/libssl/key_schedule/key_schedule.c b/regress/lib/libssl/key_schedule/key_schedule.c index f937d042c4b..cbf5ea9df74 100644 --- a/regress/lib/libssl/key_schedule/key_schedule.c +++ b/regress/lib/libssl/key_schedule/key_schedule.c @@ -1,4 +1,4 @@ -/* $OpenBSD: key_schedule.c,v 1.10 2022/11/26 16:08:56 tb Exp $ */ +/* $OpenBSD: key_schedule.c,v 1.11 2024/08/23 12:56:26 anton Exp $ */ /* * Copyright (c) 2018-2019 Bob Beck * @@ -188,7 +188,7 @@ main (int argc, char **argv) struct tls13_secrets *secrets; if ((secrets = tls13_secrets_create(EVP_sha256(), 0)) == NULL) - errx(1,"failed to create secrets\n"); + errx(1, "failed to create secrets"); secrets->insecure = 1; /* don't explicit_bzero when done */ diff --git a/regress/libexec/ld.so/hidden/libaa/aa.c b/regress/libexec/ld.so/hidden/libaa/aa.c index c8ea2ac28fb..9a7fccd9baf 100644 --- a/regress/libexec/ld.so/hidden/libaa/aa.c +++ b/regress/libexec/ld.so/hidden/libaa/aa.c @@ -1,4 +1,4 @@ -/* $OpenBSD: aa.c,v 1.2 2007/08/01 12:53:28 kurt Exp $ */ +/* $OpenBSD: aa.c,v 1.3 2024/08/23 12:56:26 anton Exp $ */ /* * Copyright (c) 2007 Kurt Miller @@ -27,5 +27,5 @@ void test_aa() { libaa_hidden_val = hidden_check; if (hidden_check != &hidden_check) - errx(1, "libaa: hidden_check != &hidden_check\n"); + errx(1, "libaa: hidden_check != &hidden_check"); } diff --git a/regress/libexec/ld.so/hidden/libab/ab.c b/regress/libexec/ld.so/hidden/libab/ab.c index 9f07283a899..7fb0dc59ca7 100644 --- a/regress/libexec/ld.so/hidden/libab/ab.c +++ b/regress/libexec/ld.so/hidden/libab/ab.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ab.c,v 1.2 2007/08/01 12:53:28 kurt Exp $ */ +/* $OpenBSD: ab.c,v 1.3 2024/08/23 12:56:26 anton Exp $ */ /* * Copyright (c) 2007 Kurt Miller @@ -27,5 +27,5 @@ void test_ab() { libab_hidden_val = hidden_check; if (hidden_check != &hidden_check) - errx(1, "libab: hidden_check != &hidden_check\n"); + errx(1, "libab: hidden_check != &hidden_check"); } diff --git a/regress/libexec/ld.so/hidden/test1/test1.c b/regress/libexec/ld.so/hidden/test1/test1.c index 151bc8e3a02..c92e3b0aab2 100644 --- a/regress/libexec/ld.so/hidden/test1/test1.c +++ b/regress/libexec/ld.so/hidden/test1/test1.c @@ -1,4 +1,4 @@ -/* $OpenBSD: test1.c,v 1.3 2017/08/07 16:33:52 bluhm Exp $ */ +/* $OpenBSD: test1.c,v 1.4 2024/08/23 12:56:26 anton Exp $ */ /* * Copyright (c) 2007 Kurt Miller @@ -35,28 +35,28 @@ main() libaa = dlopen(LIBAA, RTLD_LAZY); libab = dlopen(LIBAB, RTLD_LAZY); if (libaa == NULL) - errx(1, "dlopen(%s, RTLD_LAZY) FAILED\n", LIBAA); + errx(1, "dlopen(%s, RTLD_LAZY) FAILED", LIBAA); if (libab == NULL) - errx(1, "dlopen(%s, RTLD_LAZY) FAILED\n", LIBAB); + errx(1, "dlopen(%s, RTLD_LAZY) FAILED", LIBAB); hidden_test = (void (*)())dlsym(libaa, "test_aa"); if (hidden_test == NULL) - errx(1, "dlsym(libaa, \"test_aa\") FAILED\n"); + errx(1, "dlsym(libaa, \"test_aa\") FAILED"); (*hidden_test)(); hidden_test = (void (*)())dlsym(libab, "test_ab"); if (hidden_test == NULL) - errx(1, "dlsym(libab, \"test_ab\") FAILED\n"); + errx(1, "dlsym(libab, \"test_ab\") FAILED"); (*hidden_test)(); if (hidden_check != NULL) - errx(1, "hidden_check != NULL in main prog\n"); + errx(1, "hidden_check != NULL in main prog"); if (libaa_hidden_val == NULL || libab_hidden_val == NULL || libaa_hidden_val == libab_hidden_val) - errx(1, "incorrect hidden_check detected in libs\n"); + errx(1, "incorrect hidden_check detected in libs"); dlclose(libaa); dlclose(libab); diff --git a/regress/libexec/ld.so/hidden/test2/test2.c b/regress/libexec/ld.so/hidden/test2/test2.c index 52642357f9d..44eb7596b7b 100644 --- a/regress/libexec/ld.so/hidden/test2/test2.c +++ b/regress/libexec/ld.so/hidden/test2/test2.c @@ -1,4 +1,4 @@ -/* $OpenBSD: test2.c,v 1.3 2017/08/07 16:33:52 bluhm Exp $ */ +/* $OpenBSD: test2.c,v 1.4 2024/08/23 12:56:26 anton Exp $ */ /* * Copyright (c) 2007 Kurt Miller @@ -36,11 +36,11 @@ main() test_ab(); if (hidden_check != NULL) - errx(1, "hidden_check != NULL in main prog\n"); + errx(1, "hidden_check != NULL in main prog"); if (libaa_hidden_val == NULL || libab_hidden_val == NULL || libaa_hidden_val == libab_hidden_val) - errx(1, "incorrect hidden_check detected in libs\n"); + errx(1, "incorrect hidden_check detected in libs"); return (0); } diff --git a/regress/libexec/ld.so/lazy/libfoo/foo.c b/regress/libexec/ld.so/lazy/libfoo/foo.c index bf82a8572bc..663dcf723f9 100644 --- a/regress/libexec/ld.so/lazy/libfoo/foo.c +++ b/regress/libexec/ld.so/lazy/libfoo/foo.c @@ -1,4 +1,4 @@ -/* $OpenBSD: foo.c,v 1.3 2017/08/07 16:33:52 bluhm Exp $ */ +/* $OpenBSD: foo.c,v 1.4 2024/08/23 12:56:26 anton Exp $ */ /* Public domain. 2008, Matthieu Herrb */ #include @@ -15,7 +15,7 @@ foo_init(void) printf("loading %s\n", BAR); h = dlopen(BAR, RTLD_LAZY|RTLD_GLOBAL); if (h == NULL) - errx(1, "dlopen %s: %s\n", BAR, dlerror()); + errx(1, "dlopen %s: %s", BAR, dlerror()); printf("loaded: %s\n", BAR); } diff --git a/regress/libexec/ld.so/lazy/prog/prog.c b/regress/libexec/ld.so/lazy/prog/prog.c index 1959b7108e8..7c60228dccd 100644 --- a/regress/libexec/ld.so/lazy/prog/prog.c +++ b/regress/libexec/ld.so/lazy/prog/prog.c @@ -1,4 +1,4 @@ -/* $OpenBSD: prog.c,v 1.3 2017/02/25 07:28:32 jsg Exp $ */ +/* $OpenBSD: prog.c,v 1.4 2024/08/23 12:56:26 anton Exp $ */ /* Public Domain, 2008, Matthieu Herrb */ #include @@ -19,7 +19,7 @@ main(int argc, char *argv[]) printf("loading: %s\n", FOO); handle = dlopen(FOO, RTLD_LAZY|RTLD_GLOBAL); if (handle == NULL) { - errx(1, "dlopen: %s: %s\n", FOO, dlerror()); + errx(1, "dlopen: %s: %s", FOO, dlerror()); } printf("loaded: %s\n", FOO); printf("looking up foo\n"); diff --git a/regress/sbin/pfctl/changerule.c b/regress/sbin/pfctl/changerule.c index 8efd47d9a36..5840cc37fa4 100644 --- a/regress/sbin/pfctl/changerule.c +++ b/regress/sbin/pfctl/changerule.c @@ -1,4 +1,4 @@ -/* $OpenBSD: changerule.c,v 1.1 2021/11/11 12:49:53 sashan Exp $ */ +/* $OpenBSD: changerule.c,v 1.2 2024/08/23 12:56:26 anton Exp $ */ /* * Copyright (c) 2021 Alexandr Nedvedicky * @@ -96,7 +96,7 @@ do_chng_cmd(char *anchorname, int cmd, int rule_no) if (strlcpy(pf.anchor->path, anchorname, sizeof(pf.anchor->path)) >= sizeof (pf.anchor->path)) - errx(1, "%s: strlcpy\n", __func__); + errx(1, "%s: strlcpy", __func__); pf.astack[0] = pf.anchor; pf.asd = 0; @@ -204,7 +204,7 @@ main(int argc, char *argv[]) int len = strlen(anchoropt); if (anchoropt[len - 1] == '*') { - warnx("wildcard anchors not supported\n"); + warnx("wildcard anchors not supported"); changerule_usage(); } if (strlcpy(anchorname, anchoropt, 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 @@ -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 @@ -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 * Copyright (c) 2018 Alexander Bluhm @@ -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 @@ -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 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 @@ -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); diff --git a/regress/usr.sbin/rpki-client/test-ip.c b/regress/usr.sbin/rpki-client/test-ip.c index 57c526d1e25..b996af652fd 100644 --- a/regress/usr.sbin/rpki-client/test-ip.c +++ b/regress/usr.sbin/rpki-client/test-ip.c @@ -1,4 +1,4 @@ -/* $Id: test-ip.c,v 1.10 2024/04/22 05:54:01 claudio Exp $ */ +/* $Id: test-ip.c,v 1.11 2024/08/23 12:56:26 anton Exp $ */ /* * Copyright (c) 2019 Kristaps Dzonsons * @@ -59,7 +59,7 @@ test(const char *res, uint16_t afiv, size_t sz, size_t unused, ...) addr.prefixlen = sz * 8 - unused; ip_addr_print(&addr, afi, buf, sizeof(buf)); if (res != NULL && strcmp(res, buf)) - errx(EXIT_FAILURE, "fail: %s != %s\n", res, buf); + errx(EXIT_FAILURE, "fail: %s != %s", res, buf); else if (res != NULL) warnx("pass: %s", buf); else