mirror of
https://github.com/zeek/zeek.git
synced 2025-10-05 08:08:19 +00:00
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:
parent
bea41f5c73
commit
105d00b9b8
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue