Piotr Caban : msvcrt: Fix count parameter type in printf functions family.

Alexandre Julliard julliard at winehq.org
Wed Sep 16 15:37:33 CDT 2020


Module: wine
Branch: master
Commit: 68ca61a555b3118836dbf7b666686e1de3d988b0
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=68ca61a555b3118836dbf7b666686e1de3d988b0

Author: Piotr Caban <piotr at codeweavers.com>
Date:   Wed Sep 16 18:41:48 2020 +0200

msvcrt: Fix count parameter type in printf functions family.

Signed-off-by: Piotr Caban <piotr at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/msvcrt/msvcrt.h |  4 ++--
 dlls/msvcrt/wcs.c    | 14 +++++++-------
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/dlls/msvcrt/msvcrt.h b/dlls/msvcrt/msvcrt.h
index 6feb6c873f..86938c8cc0 100644
--- a/dlls/msvcrt/msvcrt.h
+++ b/dlls/msvcrt/msvcrt.h
@@ -1117,9 +1117,9 @@ int            WINAPIV MSVCRT_fwprintf(MSVCRT_FILE *file, const MSVCRT_wchar_t *
 int            __cdecl MSVCRT_vsnprintf(char *str, MSVCRT_size_t len, const char *format, __ms_va_list valist);
 int            __cdecl MSVCRT_vsnwprintf(MSVCRT_wchar_t *str, MSVCRT_size_t len,
                                        const MSVCRT_wchar_t *format, __ms_va_list valist );
-int            WINAPIV MSVCRT__snwprintf(MSVCRT_wchar_t*, unsigned int, const MSVCRT_wchar_t*, ...);
+int            WINAPIV MSVCRT__snwprintf(MSVCRT_wchar_t*, MSVCRT_size_t, const MSVCRT_wchar_t*, ...);
 int            WINAPIV MSVCRT_sprintf(char*,const char*,...);
-int            WINAPIV MSVCRT__snprintf(char*,unsigned int,const char*,...);
+int            WINAPIV MSVCRT__snprintf(char*,MSVCRT_size_t,const char*,...);
 int            WINAPIV MSVCRT__scprintf(const char*,...);
 int            __cdecl MSVCRT_raise(int sig);
 int            __cdecl MSVCRT__set_printf_count_output(int);
diff --git a/dlls/msvcrt/wcs.c b/dlls/msvcrt/wcs.c
index 7ceaa5c741..866c18538c 100644
--- a/dlls/msvcrt/wcs.c
+++ b/dlls/msvcrt/wcs.c
@@ -1152,7 +1152,7 @@ int CDECL MSVCRT__vscprintf_p(const char *format, __ms_va_list argptr)
 /*********************************************************************
  *		_snprintf (MSVCRT.@)
  */
-int WINAPIV MSVCRT__snprintf(char *str, unsigned int len, const char *format, ...)
+int WINAPIV MSVCRT__snprintf(char *str, MSVCRT_size_t len, const char *format, ...)
 {
     int retval;
     __ms_va_list valist;
@@ -1165,7 +1165,7 @@ int WINAPIV MSVCRT__snprintf(char *str, unsigned int len, const char *format, ..
 /*********************************************************************
  *		_snprintf_l (MSVCRT.@)
  */
-int WINAPIV MSVCRT__snprintf_l(char *str, unsigned int count, MSVCRT__locale_t locale,
+int WINAPIV MSVCRT__snprintf_l(char *str, MSVCRT_size_t count, MSVCRT__locale_t locale,
     const char *format, ...)
 {
     int retval;
@@ -1179,7 +1179,7 @@ int WINAPIV MSVCRT__snprintf_l(char *str, unsigned int count, MSVCRT__locale_t l
 /*********************************************************************
  *		_snprintf_s (MSVCRT.@)
  */
-int WINAPIV MSVCRT__snprintf_s(char *str, unsigned int len, unsigned int count,
+int WINAPIV MSVCRT__snprintf_s(char *str, MSVCRT_size_t len, MSVCRT_size_t count,
     const char *format, ...)
 {
     int retval;
@@ -1339,7 +1339,7 @@ int CDECL MSVCRT_vsnwprintf_s(MSVCRT_wchar_t *str, MSVCRT_size_t sizeOfBuffer,
 /*********************************************************************
  *		_snwprintf (MSVCRT.@)
  */
-int WINAPIV MSVCRT__snwprintf( MSVCRT_wchar_t *str, unsigned int len, const MSVCRT_wchar_t *format, ...)
+int WINAPIV MSVCRT__snwprintf( MSVCRT_wchar_t *str, MSVCRT_size_t len, const MSVCRT_wchar_t *format, ...)
 {
     int retval;
     __ms_va_list valist;
@@ -1352,7 +1352,7 @@ int WINAPIV MSVCRT__snwprintf( MSVCRT_wchar_t *str, unsigned int len, const MSVC
 /*********************************************************************
  *		_snwprintf_l (MSVCRT.@)
  */
-int WINAPIV MSVCRT__snwprintf_l( MSVCRT_wchar_t *str, unsigned int len, const MSVCRT_wchar_t *format,
+int WINAPIV MSVCRT__snwprintf_l( MSVCRT_wchar_t *str, MSVCRT_size_t len, const MSVCRT_wchar_t *format,
         MSVCRT__locale_t locale, ...)
 {
     int retval;
@@ -1366,7 +1366,7 @@ int WINAPIV MSVCRT__snwprintf_l( MSVCRT_wchar_t *str, unsigned int len, const MS
 /*********************************************************************
  *		_snwprintf_s (MSVCRT.@)
  */
-int WINAPIV MSVCRT__snwprintf_s( MSVCRT_wchar_t *str, unsigned int len, unsigned int count,
+int WINAPIV MSVCRT__snwprintf_s( MSVCRT_wchar_t *str, MSVCRT_size_t len, MSVCRT_size_t count,
     const MSVCRT_wchar_t *format, ...)
 {
     int retval;
@@ -1380,7 +1380,7 @@ int WINAPIV MSVCRT__snwprintf_s( MSVCRT_wchar_t *str, unsigned int len, unsigned
 /*********************************************************************
  *              _snwprintf_s_l (MSVCRT.@)
  */
-int WINAPIV MSVCRT__snwprintf_s_l( MSVCRT_wchar_t *str, unsigned int len, unsigned int count,
+int WINAPIV MSVCRT__snwprintf_s_l( MSVCRT_wchar_t *str, MSVCRT_size_t len, MSVCRT_size_t count,
         const MSVCRT_wchar_t *format, MSVCRT__locale_t locale, ... )
 {
     int retval;




More information about the wine-cvs mailing list