Add proper casts to avoid signed vs. unsigned mismatches in

strmake().
This commit is contained in:
Gerald Pfeifer 2003-10-30 23:09:09 +00:00 committed by Alexandre Julliard
parent d6f746de4c
commit c5dc9d29e1
1 changed files with 2 additions and 2 deletions

View File

@ -79,8 +79,8 @@ char *strmake(const char *fmt, ...)
va_start(ap, fmt);
n = vsnprintf (p, size, fmt, ap);
va_end(ap);
if (n > -1 && n < size) return p;
size = min( size*2, n+1 );
if (n > -1 && (size_t)n < size) return p;
size = min( size*2, (size_t)n+1 );
p = xrealloc (p, size);
}
}