diff options
author | davi <davi@13f79535-47bb-0310-9956-ffa450edef68> | 2007-07-09 16:05:59 +0000 |
---|---|---|
committer | davi <davi@13f79535-47bb-0310-9956-ffa450edef68> | 2007-07-09 16:05:59 +0000 |
commit | 70738e7f53f36f5828e49143d48f8db221f7c83f (patch) | |
tree | c2256c178b6a9dd78b674fc3205c2460aa37705b /strings | |
parent | 86d12b2ebee958739a499c95e309b6f4a814d6ff (diff) | |
download | libapr-70738e7f53f36f5828e49143d48f8db221f7c83f.tar.gz |
Introduce macro definitions of the min/max characteristics of the apr integer
types.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@554692 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'strings')
-rw-r--r-- | strings/apr_snprintf.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/strings/apr_snprintf.c b/strings/apr_snprintf.c index 0213964e4..9ede49e2a 100644 --- a/strings/apr_snprintf.c +++ b/strings/apr_snprintf.c @@ -381,9 +381,9 @@ static char *conv_10_quad(apr_int64_t num, register int is_unsigned, * number against the largest long value it can be. If <=, we * punt to the quicker version. */ - if ((magnitude <= UINT32_MAX && is_unsigned) - || (num <= INT32_MAX && num >= INT32_MIN && !is_unsigned)) - return(conv_10(num, is_unsigned, is_negative, buf_end, len)); + if ((magnitude <= APR_UINT32_MAX && is_unsigned) + || (num <= APR_INT32_MAX && num >= APR_INT32_MIN && !is_unsigned)) + return(conv_10((apr_int32_t)num, is_unsigned, is_negative, buf_end, len)); if (is_unsigned) { *is_negative = FALSE; @@ -640,7 +640,7 @@ static char *conv_p2_quad(apr_uint64_t num, register int nbits, static const char upper_digits[] = "0123456789ABCDEF"; register const char *digits = (format == 'X') ? upper_digits : low_digits; - if (num <= UINT32_MAX) + if (num <= APR_UINT32_MAX) return(conv_p2((apr_uint32_t)num, nbits, format, buf_end, len)); do { |