Subject: Re: CVS commit: src (LC_TIME)
To: None <source-changes@netbsd.org>
From: Geoff Wing <mason@primenet.com.au>
List: source-changes
Date: 03/29/2007 03:16:16
Geoff Wing <mason@primenet.com.au> typed:
: Emmanuel Dreyfus <manu@netbsd.org> typed:
:: Committed By:	manu
: definitions in src/lib/libc/locale/_def_time.c do not match those in
: src/sys/sys/localedef.h

Missed a couple of others.

Regards,
Geoff

--- lib/libc/locale/setlocale.c.org	2007-03-29 12:08:13.000000000 +1000
+++ lib/libc/locale/setlocale.c	2007-03-29 13:10:47.000000000 +1000
@@ -249,24 +249,25 @@
 #else
 		if (_ctype_ != _C_ctype_) {
 			/* LINTED const castaway */
-			free((void *)_ctype_);
+			free(__UNCONST(_ctype_));
 			_ctype_ = _C_ctype_;
 		}
 		if (_toupper_tab_ != _C_toupper_) {
 			/* LINTED const castaway */
-			free((void *)_toupper_tab_);
+			free(__UNCONST(_toupper_tab_));
 			_toupper_tab_ = _C_toupper_;
 		}
 		if (_tolower_tab_ != _C_tolower_) {
 			/* LINTED const castaway */
-			free((void *)_tolower_tab_);
+			free(__UNCONST(_tolower_tab_));
 			_tolower_tab_ = _C_tolower_;
 		}
 #endif
 		break;
 	case LC_TIME:
 		if (_CurrentTimeLocale != &_DefaultTimeLocale) {
-			free((void *)_CurrentTimeLocale);
+			/* LINTED const castaway */
+			free(__UNCONST(_CurrentTimeLocale));
 			_CurrentTimeLocale = &_DefaultTimeLocale;
 		}
 		break;
--- lib/libc/locale/timeio.c.org	2007-03-29 05:05:53.000000000 +1000
+++ lib/libc/locale/timeio.c	2007-03-29 13:11:00.000000000 +1000
@@ -82,7 +82,7 @@
 	}
 	if (_CurrentTimeLocale != &_DefaultTimeLocale)
 		/* LINTED const castaway */
-		free((void *)_CurrentTimeLocale);
+		free(__UNCONST(_CurrentTimeLocale));
 	_CurrentTimeLocale = tl;
 	return 1;
 bad: