From: Bruno Haible <bruno@clisp.org>
Date: Sun, 10 Jun 2007 11:18:49 +0000 (+0000)
Subject: Tweak last patch.
X-Git-Tag: cvs-readonly~256
X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=8f71f4a446809d15a11bbab62d2bc6f724f6ce38;p=gnulib.git

Tweak last patch.
---

diff --git a/lib/vasnprintf.c b/lib/vasnprintf.c
index 1b4507b517..d9a1c58955 100644
--- a/lib/vasnprintf.c
+++ b/lib/vasnprintf.c
@@ -2431,8 +2431,8 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, const FCHAR_T *format, va_list
 		int prefixes[2];
 #if !USE_SNPRINTF
 		size_t tmp_length;
-		DCHAR_T tmpbuf[700];
-		DCHAR_T *tmp;
+		TCHAR_T tmpbuf[700];
+		TCHAR_T *tmp;
 #endif
 
 #if !USE_SNPRINTF || NEED_PRINTF_FLAG_ZERO
@@ -2675,16 +2675,16 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, const FCHAR_T *format, va_list
 		  tmp_length = xsum (tmp_length, 1); /* account for trailing NUL */
 		}
 
-		if (tmp_length <= sizeof (tmpbuf) / sizeof (DCHAR_T))
+		if (tmp_length <= sizeof (tmpbuf) / sizeof (TCHAR_T))
 		  tmp = tmpbuf;
 		else
 		  {
-		    size_t tmp_memsize = xtimes (tmp_length, sizeof (DCHAR_T));
+		    size_t tmp_memsize = xtimes (tmp_length, sizeof (TCHAR_T));
 
 		    if (size_overflow_p (tmp_memsize))
 		      /* Overflow, would lead to out of memory.  */
 		      goto out_of_memory;
-		    tmp = (DCHAR_T *) malloc (tmp_memsize);
+		    tmp = (TCHAR_T *) malloc (tmp_memsize);
 		    if (tmp == NULL)
 		      /* Out of memory.  */
 		      goto out_of_memory;