summaryrefslogtreecommitdiff
path: root/src/regress/lib/libc/locale/mbrtowc/test_mbrtowc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/regress/lib/libc/locale/mbrtowc/test_mbrtowc.c')
-rw-r--r--src/regress/lib/libc/locale/mbrtowc/test_mbrtowc.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/regress/lib/libc/locale/mbrtowc/test_mbrtowc.c b/src/regress/lib/libc/locale/mbrtowc/test_mbrtowc.c
index 5794791ffb..5926d25fd0 100644
--- a/src/regress/lib/libc/locale/mbrtowc/test_mbrtowc.c
+++ b/src/regress/lib/libc/locale/mbrtowc/test_mbrtowc.c
@@ -1,3 +1,4 @@
1/* $OpenBSD: test_mbrtowc.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 *
@@ -33,12 +34,12 @@ onetest(const char *name, const char *in, size_t insz,
33 34
34 sz = mbrtowc(&wc, in, insz, &mbs); 35 sz = mbrtowc(&wc, in, insz, &mbs);
35 if (errno != outerr) 36 if (errno != outerr)
36 err(1, "%d %s(%zd)", MB_CUR_MAX, name, insz); 37 err(1, "%zu %s(%zd)", MB_CUR_MAX, name, insz);
37 if (sz != outsz || (out != WEOF && wc != out)) 38 if (sz != outsz || (out != WEOF && wc != out))
38 errx(1, "%d %s(%zd) = (%zd, %d) != (%zd, %d)", 39 errx(1, "%zu %s(%zd) = (%zd, %d) != (%zd, %d)",
39 MB_CUR_MAX, name, insz, sz, wc, outsz, out); 40 MB_CUR_MAX, name, insz, sz, wc, outsz, out);
40 if (mbsinit(&mbs) == (insz && outsz == (size_t)-2)) 41 if (mbsinit(&mbs) == (insz && outsz == (size_t)-2))
41 errx(1, "%d %s(%zd) mbsinit", MB_CUR_MAX, name, insz); 42 errx(1, "%zu %s(%zd) mbsinit", MB_CUR_MAX, name, insz);
42 if (errno == 0 && outerr == 0) 43 if (errno == 0 && outerr == 0)
43 return; 44 return;
44 errno = 0; 45 errno = 0;