int ByteExtractStringUint32(uint32_t *res, int base, uint16_t len, const char *str)
{
uint64_t i64;
- int ret;
- ret = ByteExtractString(&i64, base, len, str);
+ int ret = ByteExtractString(&i64, base, len, str);
if (ret <= 0) {
return ret;
}
*res = (uint32_t)i64;
if ((uint64_t)(*res) != i64) {
- SCLogError(SC_ERR_NUMERIC_VALUE_ERANGE, "Numeric value out of range "
- "(%" PRIu64 " > %" PRIuMAX ")", i64, (uintmax_t)UINT_MAX);
+ SCLogDebug("Numeric value out of range (%" PRIu64 " > %" PRIuMAX ")",
+ i64, (uintmax_t)UINT_MAX);
return -1;
}
int ByteExtractStringUint16(uint16_t *res, int base, uint16_t len, const char *str)
{
uint64_t i64;
- int ret;
- ret = ByteExtractString(&i64, base, len, str);
+ int ret = ByteExtractString(&i64, base, len, str);
if (ret <= 0) {
return ret;
}
*res = (uint16_t)i64;
if ((uint64_t)(*res) != i64) {
- SCLogError(SC_ERR_NUMERIC_VALUE_ERANGE, "Numeric value out of range "
- "(%" PRIu64 " > %" PRIuMAX ")", i64, (uintmax_t)USHRT_MAX);
+ SCLogDebug("Numeric value out of range (%" PRIu64 " > %" PRIuMAX ")",
+ i64, (uintmax_t)USHRT_MAX);
return -1;
}
int ByteExtractStringUint8(uint8_t *res, int base, uint16_t len, const char *str)
{
uint64_t i64;
- int ret;
- ret = ByteExtractString(&i64, base, len, str);
+ int ret = ByteExtractString(&i64, base, len, str);
if (ret <= 0) {
return ret;
}
*res = (uint8_t)i64;
if ((uint64_t)(*res) != i64) {
- SCLogError(SC_ERR_NUMERIC_VALUE_ERANGE, "Numeric value out of range "
- "(%" PRIu64 " > %" PRIuMAX ")", i64, (uintmax_t)UCHAR_MAX);
+ SCLogDebug("Numeric value out of range (%" PRIu64 " > %" PRIuMAX ")",
+ i64, (uintmax_t)UCHAR_MAX);
return -1;
}