diff options
Diffstat (limited to 'src/regress/lib/libc/locale/wcrtomb/test_wcrtomb.c')
-rw-r--r-- | src/regress/lib/libc/locale/wcrtomb/test_wcrtomb.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/regress/lib/libc/locale/wcrtomb/test_wcrtomb.c b/src/regress/lib/libc/locale/wcrtomb/test_wcrtomb.c index 6539d9f1bd..26b21fdd5b 100644 --- a/src/regress/lib/libc/locale/wcrtomb/test_wcrtomb.c +++ b/src/regress/lib/libc/locale/wcrtomb/test_wcrtomb.c | |||
@@ -1,3 +1,4 @@ | |||
1 | /* $OpenBSD: test_wcrtomb.c,v 1.2 2017/07/27 15:08:37 bluhm Exp $ */ | ||
1 | /* | 2 | /* |
2 | * Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org> | 3 | * Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org> |
3 | * | 4 | * |
@@ -35,13 +36,13 @@ onetest(const char *name, const wchar_t wcin, int outerr, const char *out) | |||
35 | outsz = out == NULL ? (size_t)-1 : *out == '\0' ? 1 : strlen(out); | 36 | outsz = out == NULL ? (size_t)-1 : *out == '\0' ? 1 : strlen(out); |
36 | sz = wcrtomb(buf, wcin, &mbs); | 37 | sz = wcrtomb(buf, wcin, &mbs); |
37 | if (errno != outerr) | 38 | if (errno != outerr) |
38 | err(1, "%d %s U+%04X", MB_CUR_MAX, name, wcin); | 39 | err(1, "%zu %s U+%04X", MB_CUR_MAX, name, wcin); |
39 | if (sz != outsz || (out != NULL && strncmp(buf, out, sz))) | 40 | if (sz != outsz || (out != NULL && strncmp(buf, out, sz))) |
40 | errx(1, "%d %s U+%04X: %4.4s(%zd) != %4.4s(%zd)", | 41 | errx(1, "%zu %s U+%04X: %4.4s(%zd) != %4.4s(%zd)", |
41 | MB_CUR_MAX, name, wcin, buf, sz, | 42 | MB_CUR_MAX, name, wcin, buf, sz, |
42 | out == NULL ? "(NULL)" : out, outsz); | 43 | out == NULL ? "(NULL)" : out, outsz); |
43 | if (mbsinit(&mbs) == 0) | 44 | if (mbsinit(&mbs) == 0) |
44 | errx(1, "%d %s U+%04X mbsinit", MB_CUR_MAX, name, wcin); | 45 | errx(1, "%zu %s U+%04X mbsinit", MB_CUR_MAX, name, wcin); |
45 | if (errno == 0 && outerr == 0) | 46 | if (errno == 0 && outerr == 0) |
46 | return; | 47 | return; |
47 | errno = 0; | 48 | errno = 0; |