From owner-svn-src-head@FreeBSD.ORG Thu Dec 11 02:39:28 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8EA0E106564A; Thu, 11 Dec 2008 02:39:28 +0000 (UTC) (envelope-from das@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7AADE8FC1A; Thu, 11 Dec 2008 02:39:28 +0000 (UTC) (envelope-from das@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBB2dSkL050590; Thu, 11 Dec 2008 02:39:28 GMT (envelope-from das@svn.freebsd.org) Received: (from das@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBB2dSnv050588; Thu, 11 Dec 2008 02:39:28 GMT (envelope-from das@svn.freebsd.org) Message-Id: <200812110239.mBB2dSnv050588@svn.freebsd.org> From: David Schultz Date: Thu, 11 Dec 2008 02:39:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185904 - head/lib/libc/stdio X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Dec 2008 02:39:28 -0000 Author: das Date: Thu Dec 11 02:39:27 2008 New Revision: 185904 URL: http://svn.freebsd.org/changeset/base/185904 Log: Consolidate some variable initializations. No substantive change. Modified: head/lib/libc/stdio/vfprintf.c head/lib/libc/stdio/vfwprintf.c Modified: head/lib/libc/stdio/vfprintf.c ============================================================================== --- head/lib/libc/stdio/vfprintf.c Thu Dec 11 02:24:11 2008 (r185903) +++ head/lib/libc/stdio/vfprintf.c Thu Dec 11 02:39:27 2008 (r185904) @@ -567,13 +567,6 @@ __vfprintf(FILE *fp, const char *fmt0, v if (__use_xprintf > 0) return (__xvprintf(fp, fmt0, ap)); - thousands_sep = '\0'; - grouping = NULL; - convbuf = NULL; -#ifndef NO_FLOATING_POINT - dtoaresult = NULL; - decimal_point = localeconv()->decimal_point; -#endif /* sorry, fprintf(read_only_file, "") returns EOF, not 0 */ if (prepwrite(fp) != 0) return (EOF); @@ -583,6 +576,9 @@ __vfprintf(FILE *fp, const char *fmt0, v fp->_file >= 0) return (__sbprintf(fp, fmt0, ap)); + thousands_sep = '\0'; + grouping = NULL; + convbuf = NULL; fmt = (char *)fmt0; argtable = NULL; nextarg = 1; @@ -591,6 +587,10 @@ __vfprintf(FILE *fp, const char *fmt0, v uio.uio_resid = 0; uio.uio_iovcnt = 0; ret = 0; +#ifndef NO_FLOATING_POINT + dtoaresult = NULL; + decimal_point = localeconv()->decimal_point; +#endif /* * Scan the format for conversions (`%' character). Modified: head/lib/libc/stdio/vfwprintf.c ============================================================================== --- head/lib/libc/stdio/vfwprintf.c Thu Dec 11 02:24:11 2008 (r185903) +++ head/lib/libc/stdio/vfwprintf.c Thu Dec 11 02:39:27 2008 (r185904) @@ -575,12 +575,6 @@ __vfwprintf(FILE *fp, const wchar_t *fmt } - thousands_sep = '\0'; - grouping = NULL; -#ifndef NO_FLOATING_POINT - decimal_point = localeconv()->decimal_point; -#endif - convbuf = NULL; /* sorry, fwprintf(read_only_file, L"") returns WEOF, not 0 */ if (prepwrite(fp) != 0) return (EOF); @@ -590,11 +584,17 @@ __vfwprintf(FILE *fp, const wchar_t *fmt fp->_file >= 0) return (__sbprintf(fp, fmt0, ap)); + thousands_sep = '\0'; + grouping = NULL; + convbuf = NULL; fmt = (wchar_t *)fmt0; argtable = NULL; nextarg = 1; va_copy(orgap, ap); ret = 0; +#ifndef NO_FLOATING_POINT + decimal_point = localeconv()->decimal_point; +#endif /* * Scan the format for conversions (`%' character).