Fix -Wsign-compare warnings

This commit is contained in:
Chris Peterson 2014-05-28 19:04:06 -07:00 committed by Jason Evans
parent 94ed6812bc
commit 3e310b34eb
2 changed files with 4 additions and 4 deletions

View file

@ -100,7 +100,7 @@ uintmax_t
malloc_strtoumax(const char *restrict nptr, char **restrict endptr, int base)
{
uintmax_t ret, digit;
int b;
unsigned b;
bool neg;
const char *p, *ns;
@ -548,7 +548,7 @@ malloc_vsnprintf(char *str, size_t size, const char *format, va_list ap)
assert(len == '?' || len == 'l');
assert_not_implemented(len != 'l');
s = va_arg(ap, char *);
slen = (prec < 0) ? strlen(s) : prec;
slen = (prec < 0) ? strlen(s) : (size_t)prec;
APPEND_PADDED_S(s, slen, width, left_justify);
f++;
break;