summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorchristos <christos@NetBSD.org>2021-02-25 21:47:46 +0000
committerchristos <christos@NetBSD.org>2021-02-25 21:47:46 +0000
commit0fe4efe468df6be76cd41b72a8fea6ec46f630f3 (patch)
tree56f7e74b0220627b26b2a5041b21743825068b59 /lib
parent9c97735899cb4a3377cc92cb822eb091e0dc862c (diff)
fix NLS compilation
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/regex/engine.c7
-rw-r--r--lib/libc/regex/regcomp.c6
2 files changed, 6 insertions, 7 deletions
diff --git a/lib/libc/regex/engine.c b/lib/libc/regex/engine.c
index bf4b0ca7e57..ca8b24d3230 100644
--- a/lib/libc/regex/engine.c
+++ b/lib/libc/regex/engine.c
@@ -1,4 +1,4 @@
-/* $NetBSD: engine.c,v 1.28 2021/02/25 21:28:40 christos Exp $ */
+/* $NetBSD: engine.c,v 1.29 2021/02/25 21:47:46 christos Exp $ */
/*-
* SPDX-License-Identifier: BSD-3-Clause
@@ -41,7 +41,7 @@
#ifdef __FBSDID
__FBSDID("$FreeBSD: head/lib/libc/regex/engine.c 368358 2020-12-05 03:16:05Z kevans $");
#endif
-__RCSID("$NetBSD: engine.c,v 1.28 2021/02/25 21:28:40 christos Exp $");
+__RCSID("$NetBSD: engine.c,v 1.29 2021/02/25 21:47:46 christos Exp $");
#include <stdbool.h>
@@ -187,9 +187,8 @@ stepback(const char *start, const char *cur, int nchar)
return (ret);
out:
-#else
- return (cur - nchar) > start ? cur - nchar : NULL;
#endif
+ return (cur - nchar) > start ? cur - nchar : NULL;
}
/*
diff --git a/lib/libc/regex/regcomp.c b/lib/libc/regex/regcomp.c
index e8ee58bb098..bfac29e39fe 100644
--- a/lib/libc/regex/regcomp.c
+++ b/lib/libc/regex/regcomp.c
@@ -1,4 +1,4 @@
-/* $NetBSD: regcomp.c,v 1.42 2021/02/25 21:28:40 christos Exp $ */
+/* $NetBSD: regcomp.c,v 1.43 2021/02/25 21:47:46 christos Exp $ */
/*-
* SPDX-License-Identifier: BSD-3-Clause
@@ -47,7 +47,7 @@
static char sccsid[] = "@(#)regcomp.c 8.5 (Berkeley) 3/20/94";
__FBSDID("$FreeBSD: head/lib/libc/regex/regcomp.c 368359 2020-12-05 03:18:48Z kevans $");
#endif
-__RCSID("$NetBSD: regcomp.c,v 1.42 2021/02/25 21:28:40 christos Exp $");
+__RCSID("$NetBSD: regcomp.c,v 1.43 2021/02/25 21:47:46 christos Exp $");
#define _OPENBSD_SOURCE
@@ -2130,7 +2130,7 @@ findmust(struct parse *p, struct re_guts *g)
while (OP(s = *scan++) != OCHAR)
continue;
#ifdef NLS
- clen = wcrtomb(cp, (int)OPND(s), &mbs);
+ size_t clen = wcrtomb(cp, (int)OPND(s), &mbs);
assert(clen != (size_t)-1);
cp += clen;
#else