msvcrt: Avoid using size_t when not neededed.
This commit is contained in:
parent
5f0fb8350f
commit
109f83614f
|
@ -136,7 +136,7 @@ static void EXCEPTION_ctor(exception *_this, const char** name)
|
||||||
_this->vtable = &MSVCRT_exception_vtable;
|
_this->vtable = &MSVCRT_exception_vtable;
|
||||||
if (*name)
|
if (*name)
|
||||||
{
|
{
|
||||||
size_t name_len = strlen(*name) + 1;
|
unsigned int name_len = strlen(*name) + 1;
|
||||||
_this->name = MSVCRT_malloc(name_len);
|
_this->name = MSVCRT_malloc(name_len);
|
||||||
memcpy(_this->name, *name, name_len);
|
memcpy(_this->name, *name, name_len);
|
||||||
_this->do_free = TRUE;
|
_this->do_free = TRUE;
|
||||||
|
|
|
@ -231,7 +231,7 @@ MSVCRT_wchar_t*** CDECL __p___winitenv(void) { return &MSVCRT___winitenv; }
|
||||||
/* INTERNAL: Create a wide string from an ascii string */
|
/* INTERNAL: Create a wide string from an ascii string */
|
||||||
MSVCRT_wchar_t *msvcrt_wstrdupa(const char *str)
|
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));
|
MSVCRT_wchar_t *wstr = MSVCRT_malloc(len* sizeof (MSVCRT_wchar_t));
|
||||||
if (!wstr)
|
if (!wstr)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
|
@ -78,7 +78,7 @@ static const char * const _country_synonyms[] =
|
||||||
/* INTERNAL: Map a synonym to an ISO code */
|
/* INTERNAL: Map a synonym to an ISO code */
|
||||||
static void remap_synonym(char *name)
|
static void remap_synonym(char *name)
|
||||||
{
|
{
|
||||||
size_t i;
|
unsigned int i;
|
||||||
for (i = 0; i < sizeof(_country_synonyms)/sizeof(char*); i += 2 )
|
for (i = 0; i < sizeof(_country_synonyms)/sizeof(char*); i += 2 )
|
||||||
{
|
{
|
||||||
if (!strcasecmp(_country_synonyms[i],name))
|
if (!strcasecmp(_country_synonyms[i],name))
|
||||||
|
|
|
@ -113,7 +113,7 @@ struct datatype_t
|
||||||
* where we use a poor-man allocator. It's fast, and since all
|
* where we use a poor-man allocator. It's fast, and since all
|
||||||
* allocation is pool, memory management is easy (esp. freeing).
|
* 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;
|
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, ...)
|
static char* str_printf(struct parsed_symbol* sym, const char* format, ...)
|
||||||
{
|
{
|
||||||
va_list args;
|
va_list args;
|
||||||
size_t len = 1, i, sz;
|
unsigned int len = 1, i, sz;
|
||||||
char* tmp;
|
char* tmp;
|
||||||
char* p;
|
char* p;
|
||||||
char* t;
|
char* t;
|
||||||
|
|
||||||
va_start(args, format);
|
va_start(args, format);
|
||||||
for (i = 0; format[i]; i++)
|
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)
|
static char* get_class_string(struct parsed_symbol* sym, int start)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
size_t len, sz;
|
unsigned int len, sz;
|
||||||
char* ret;
|
char* ret;
|
||||||
struct array *a = &sym->stack;
|
struct array *a = &sym->stack;
|
||||||
|
|
||||||
for (len = 0, i = start; i < a->num; i++)
|
for (len = 0, i = start; i < a->num; i++)
|
||||||
|
|
Loading…
Reference in New Issue