* smallprint.cc (__small_vsprintf): Use already available buffer tmp
in wfillin case.
This commit is contained in:
		| @@ -1,3 +1,8 @@ | ||||
| 2009-01-23  Corinna Vinschen  <corinna@vinschen.de> | ||||
|  | ||||
| 	* smallprint.cc (__small_vsprintf): Use already available buffer tmp | ||||
| 	in wfillin case. | ||||
|  | ||||
| 2009-01-22  Christopher Faylor  <me+cygwin@cgf.cx> | ||||
|  | ||||
| 	* select.cc (peek_serial): Add hack to allow proper operation with | ||||
|   | ||||
| @@ -195,18 +195,15 @@ __small_vsprintf (char *dst, const char *fmt, va_list ap) | ||||
| 		  us = va_arg (ap, PUNICODE_STRING); | ||||
| 		wfillin: | ||||
| 		  { | ||||
| 		    char *tmpbuf; | ||||
|  | ||||
| 		    if (!sys_wcstombs_alloc (&tmpbuf, HEAP_NOTHEAP, us->Buffer, | ||||
| 		    if (!sys_wcstombs (tmp, NT_MAX_PATH, us->Buffer, | ||||
| 				       us->Length / sizeof (WCHAR))) | ||||
| 		      { | ||||
| 			s = "invalid UNICODE_STRING"; | ||||
| 			goto fillin; | ||||
| 		      } | ||||
| 		    char *tmp = tmpbuf; | ||||
| 		    for (i = 0; *tmp && i < n; i++) | ||||
| 		      *dst++ = *tmp++; | ||||
| 		    free (tmpbuf); | ||||
| 		    char *t = tmp; | ||||
| 		    for (i = 0; *t && i < n; i++) | ||||
| 		      *dst++ = *t++; | ||||
| 		  } | ||||
| 		  break; | ||||
| 		default: | ||||
|   | ||||
		Reference in New Issue
	
	Block a user