Fix ambiguous call to abs().

Observed on FreeBSD build that the compiler would emit an error claiming

  Val(abs(val.int_val), TYPE_COUNT)

is ambiguous because it can't make a choice between cstdlib's
"int abs(int)" or "long abs(long)" signatures.  And actually, since
we now always use 64 bit integers for bro_int_t, we can use
"long long llabs(long long)".
This commit is contained in:
Jon Siwek 2010-11-01 10:26:34 -05:00
parent bea41f5c73
commit 105d00b9b8

View file

@ -524,7 +524,7 @@ Val* Val::SizeVal() const
{
switch ( type->InternalType() ) {
case TYPE_INTERNAL_INT:
return new Val(abs(val.int_val), TYPE_COUNT);
return new Val(llabs(val.int_val), TYPE_COUNT);
case TYPE_INTERNAL_UNSIGNED:
return new Val(val.uint_val, TYPE_COUNT);