-/* $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 <tb@openbsd.org>
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);
-/* $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 <jsing@openbsd.org>
*
}
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",
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];
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];
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];
-/* $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 <jsing@openbsd.org>
* Copyright (c) 2020-2021 Bob Beck <beck@openbsd.org>
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),
-/* $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 <jsing@openbsd.org>
* Copyright (c) 2020-2021 Bob Beck <beck@openbsd.org>
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),
-/* $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 <jsing@openbsd.org>
* Copyright (c) 2020-2021 Bob Beck <beck@openbsd.org>
}
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));
-/* $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 <jsing@openbsd.org>
* Copyright (c) 2020-2023 Bob Beck <beck@openbsd.org>
}
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));
-/* $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 <jsing@openbsd.org>
* Copyright (c) 2020-2021 Bob Beck <beck@openbsd.org>
}
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));
-/* $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 <beck@openbsd.org>
*
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 */
-/* $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 <kurt@openbsd.org>
{
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");
}
-/* $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 <kurt@openbsd.org>
{
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");
}
-/* $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 <kurt@openbsd.org>
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);
-/* $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 <kurt@openbsd.org>
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);
}
-/* $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 <dlfcn.h>
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);
}
-/* $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 <dlfcn.h>
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");
-/* $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 <sashan@openbsd.org>
*
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;
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,
-/* $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>
}
}
if (ours == NULL) {
- warn("failed to find vm %uz\n", vcp.vcp_id);
+ warn("failed to find vm %uz", vcp.vcp_id);
goto out;
}
}
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;
}
-/* $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>
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;
}
-/* $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>
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);
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);
-/* $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>
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");
+ }
}
}
-/* $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.
*/
(toggle ? WIFSTOPPED(status) : WIFCONTINUED(status)));
if (!WIFEXITED(status))
- err(1, "bad status: %d\n", status);
+ err(1, "bad status: %d", status);
return 0;
}
-/* $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>
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
-/* $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
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);
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);
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);
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));
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')
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);
-/* $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 <kristaps@bsd.lv>
*
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