Michael Stefaniuc : msvcrt: Avoid using size_t when not neededed.

Alexandre Julliard julliard at winehq.org
Wed May 27 09:26:56 CDT 2009


Module: wine
Branch: master
Commit: 109f83614fa1d3b180873ab98e6972a5ec7f383d
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=109f83614fa1d3b180873ab98e6972a5ec7f383d

Author: Michael Stefaniuc <mstefani at redhat.de>
Date:   Wed May 27 11:39:05 2009 +0200

msvcrt: Avoid using size_t when not neededed.

---

 dlls/msvcrt/cpp.c     |    2 +-
 dlls/msvcrt/data.c    |    2 +-
 dlls/msvcrt/locale.c  |    2 +-
 dlls/msvcrt/undname.c |   18 +++++++++---------
 4 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/dlls/msvcrt/cpp.c b/dlls/msvcrt/cpp.c
index 6bc6d3d..0ed28dd 100644
--- a/dlls/msvcrt/cpp.c
+++ b/dlls/msvcrt/cpp.c
@@ -136,7 +136,7 @@ static void EXCEPTION_ctor(exception *_this, const char** name)
   _this->vtable = &MSVCRT_exception_vtable;
   if (*name)
   {
-    size_t name_len = strlen(*name) + 1;
+    unsigned int name_len = strlen(*name) + 1;
     _this->name = MSVCRT_malloc(name_len);
     memcpy(_this->name, *name, name_len);
     _this->do_free = TRUE;
diff --git a/dlls/msvcrt/data.c b/dlls/msvcrt/data.c
index a031f16..1e4eafc 100644
--- a/dlls/msvcrt/data.c
+++ b/dlls/msvcrt/data.c
@@ -231,7 +231,7 @@ MSVCRT_wchar_t*** CDECL __p___winitenv(void) { return &MSVCRT___winitenv; }
 /* INTERNAL: Create a wide string from an ascii string */
 MSVCRT_wchar_t *msvcrt_wstrdupa(const char *str)
 {
-  const size_t len = strlen(str) + 1 ;
+  const unsigned int len = strlen(str) + 1 ;
   MSVCRT_wchar_t *wstr = MSVCRT_malloc(len* sizeof (MSVCRT_wchar_t));
   if (!wstr)
     return NULL;
diff --git a/dlls/msvcrt/locale.c b/dlls/msvcrt/locale.c
index 5d6e545..3e15abd 100644
--- a/dlls/msvcrt/locale.c
+++ b/dlls/msvcrt/locale.c
@@ -78,7 +78,7 @@ static const char * const _country_synonyms[] =
 /* INTERNAL: Map a synonym to an ISO code */
 static void remap_synonym(char *name)
 {
-  size_t i;
+  unsigned int i;
   for (i = 0; i < sizeof(_country_synonyms)/sizeof(char*); i += 2 )
   {
     if (!strcasecmp(_country_synonyms[i],name))
diff --git a/dlls/msvcrt/undname.c b/dlls/msvcrt/undname.c
index 3e1be47..d825cfc 100644
--- a/dlls/msvcrt/undname.c
+++ b/dlls/msvcrt/undname.c
@@ -113,7 +113,7 @@ struct datatype_t
  * where we use a poor-man allocator. It's fast, and since all
  * allocation is pool, memory management is easy (esp. freeing).
  */
-static void*    und_alloc(struct parsed_symbol* sym, size_t len)
+static void*    und_alloc(struct parsed_symbol* sym, unsigned int len)
 {
     void*       ptr;
 
@@ -233,11 +233,11 @@ static char* str_array_get_ref(struct array* cref, unsigned idx)
  */
 static char* str_printf(struct parsed_symbol* sym, const char* format, ...)
 {
-    va_list     args;
-    size_t      len = 1, i, sz;
-    char*       tmp;
-    char*       p;
-    char*       t;
+    va_list      args;
+    unsigned int len = 1, i, sz;
+    char*        tmp;
+    char*        p;
+    char*        t;
 
     va_start(args, format);
     for (i = 0; format[i]; i++)
@@ -587,9 +587,9 @@ static BOOL get_class(struct parsed_symbol* sym)
  */
 static char* get_class_string(struct parsed_symbol* sym, int start)
 {
-    int         i;
-    size_t      len, sz;
-    char*       ret;
+    int          i;
+    unsigned int len, sz;
+    char*        ret;
     struct array *a = &sym->stack;
 
     for (len = 0, i = start; i < a->num; i++)




More information about the wine-cvs mailing list