Date: Tue, 22 Jan 2013 05:39:34 +0000 (UTC) From: Andrew Turner <andrew@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245767 - head/usr.bin/tr Message-ID: <201301220539.r0M5dYbw024075@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: andrew Date: Tue Jan 22 05:39:34 2013 New Revision: 245767 URL: http://svnweb.freebsd.org/changeset/base/245767 Log: When copying the complement of the string loop to WINT_MAX as we are dealing with a wint_t. WINT_MAX and WCHAR_MAX are the same on most architectures except ARM EABI where wint_t is signed and wchar_t is unsigned. Modified: head/usr.bin/tr/tr.c Modified: head/usr.bin/tr/tr.c ============================================================================== --- head/usr.bin/tr/tr.c Tue Jan 22 04:50:21 2013 (r245766) +++ head/usr.bin/tr/tr.c Tue Jan 22 05:39:34 2013 (r245767) @@ -47,6 +47,7 @@ static const char sccsid[] = "@(#)tr.c 8 #include <err.h> #include <limits.h> #include <locale.h> +#include <stdint.h> #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -267,7 +268,7 @@ endloop: */ s2.str = argv[1]; s2.state = NORMAL; - for (cnt = 0; cnt < WCHAR_MAX; cnt++) { + for (cnt = 0; cnt < WINT_MAX; cnt++) { if (Cflag && !iswrune(cnt)) continue; if (cmap_lookup(map, cnt) == OOBCH) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201301220539.r0M5dYbw024075>