Module Name:    src
Committed By:   christos
Date:           Thu Feb 25 21:47:46 UTC 2021

Modified Files:
        src/lib/libc/regex: engine.c regcomp.c

Log Message:
fix NLS compilation


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/lib/libc/regex/engine.c
cvs rdiff -u -r1.42 -r1.43 src/lib/libc/regex/regcomp.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libc/regex/engine.c
diff -u src/lib/libc/regex/engine.c:1.28 src/lib/libc/regex/engine.c:1.29
--- src/lib/libc/regex/engine.c:1.28	Thu Feb 25 16:28:40 2021
+++ src/lib/libc/regex/engine.c	Thu Feb 25 16:47:46 2021
@@ -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 *
 
 	return (ret);
 out:
-#else
-	return (cur - nchar) > start ? cur - nchar : NULL;
 #endif
+	return (cur - nchar) > start ? cur - nchar : NULL;
 }
 
 /*

Index: src/lib/libc/regex/regcomp.c
diff -u src/lib/libc/regex/regcomp.c:1.42 src/lib/libc/regex/regcomp.c:1.43
--- src/lib/libc/regex/regcomp.c:1.42	Thu Feb 25 16:28:40 2021
+++ src/lib/libc/regex/regcomp.c	Thu Feb 25 16:47:46 2021
@@ -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
 		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

Reply via email to