summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordlg <dlg@openbsd.org>2020-03-09 09:29:10 +0000
committerdlg <dlg@openbsd.org>2020-03-09 09:29:10 +0000
commit7928e20dd0aca922c3a0e8ae17965431ff9265fb (patch)
tree784d2a1a14e816f62d998e0de2972c2b68cc2f3e
parentRecommit, now that we found out how to fix the BIOS related issues: go (diff)
downloadwireguard-openbsd-7928e20dd0aca922c3a0e8ae17965431ff9265fb.tar.xz
wireguard-openbsd-7928e20dd0aca922c3a0e8ae17965431ff9265fb.zip
cstyle in illumos noticed some weird syntax, which this fixes.
some errx lines in if statements were terminated with commas, which caused the following statement to be considered part of the error handling. while it is bad style, ingo points out it was also a bug which which caused some tests in the code to be skipped. this reminds me of a haiku that Chris Pascoe (cpascoe@) had behind his desk: Also, that comma Should be a semi-colon. Cherry blossoms fall. this was found by Robert Mustacchi when porting the tests to illumos. ok schwarze@ stsp@ thank you robert.
-rw-r--r--regress/lib/libc/locale/mbrtowc/test_mbrtowc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/regress/lib/libc/locale/mbrtowc/test_mbrtowc.c b/regress/lib/libc/locale/mbrtowc/test_mbrtowc.c
index 5926d25fd00..7455f684393 100644
--- a/regress/lib/libc/locale/mbrtowc/test_mbrtowc.c
+++ b/regress/lib/libc/locale/mbrtowc/test_mbrtowc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: test_mbrtowc.c,v 1.2 2017/07/27 15:08:37 bluhm Exp $ */
+/* $OpenBSD: test_mbrtowc.c,v 1.3 2020/03/09 09:29:10 dlg Exp $ */
/*
* Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
*
@@ -57,7 +57,7 @@ main(void)
onetest("CSI", "\233", 2, 0, 1, L'\233');
if (setlocale(LC_CTYPE, "en_US.UTF-8") == NULL)
- errx(1, "setlocale(UTF-8) failed"),
+ errx(1, "setlocale(UTF-8) failed");
onetest("NUL", "", 0, 0, -2, WEOF);
onetest("NUL", "", 8, 0, 0, L'\0');
@@ -72,12 +72,12 @@ main(void)
onetest("U+CFFF", "\277", 8, 0, 1, 0xcfff);
if (setlocale(LC_CTYPE, "POSIX") == NULL)
- errx(1, "setlocale(POSIX) failed"),
+ errx(1, "setlocale(POSIX) failed");
onetest("0xff", "\277", 2, 0, 1, L'\277');
if (setlocale(LC_CTYPE, "en_US.UTF-8") == NULL)
- errx(1, "second setlocale(UTF-8) failed"),
+ errx(1, "second setlocale(UTF-8) failed");
onetest("U+13000", "\360\223\200\200", 8, 0, 4, 0x13000);