From: Alan T. DeKok Date: Mon, 29 Jul 2019 17:36:24 +0000 (-0400) Subject: fix error messages X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3c1adbfdf2bbf3300680523c00543b2b7b47cbf2;p=thirdparty%2Ffreeradius-server.git fix error messages use "..." instead of "-", so that the user doesn't get confused with negative numbers use PRId64 for signed numbers, so that we don't get the numbers printed as unsigned, with the high bit set --- diff --git a/src/lib/util/value.c b/src/lib/util/value.c index 230906f0ae0..cc0d49c83bc 100644 --- a/src/lib/util/value.c +++ b/src/lib/util/value.c @@ -3442,7 +3442,7 @@ static int fr_value_box_from_integer_str(fr_value_box_t *dst, fr_type_t dst_type do { \ if (uinteger > _type ## _MAX) { \ fr_strerror_printf("Value %" PRIu64 " is invalid for type %s (must be in range " \ - "0-%" PRIu64 ")", \ + "0...%" PRIu64 ")", \ uinteger, fr_int2str(fr_value_box_type_table, dst_type, ""), \ (uint64_t) _type ## _MAX); \ return -1; \ @@ -3452,8 +3452,8 @@ static int fr_value_box_from_integer_str(fr_value_box_t *dst, fr_type_t dst_type #define IN_RANGE_SIGNED(_type) \ do { \ if ((sinteger > _type ## _MAX) || (sinteger < _type ## _MIN)) { \ - fr_strerror_printf("Value %" PRIu64 " is invalid for type %s (must be in range " \ - "%" PRIu64 "-%" PRIu64 ")", \ + fr_strerror_printf("Value %" PRId64 " is invalid for type %s (must be in range " \ + "%" PRId64 "...%" PRId64 ")", \ sinteger, fr_int2str(fr_value_box_type_table, dst_type, ""), \ (int64_t) _type ## _MIN, (int64_t) _type ## _MAX); \ return -1; \