mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 22:58:20 +00:00
Deprecate bro_int_t and bro_uint_t
This commit is contained in:
parent
d066013793
commit
f624c18383
67 changed files with 331 additions and 320 deletions
10
src/UID.cc
10
src/UID.cc
|
@ -12,15 +12,15 @@ using namespace std;
|
|||
namespace zeek
|
||||
{
|
||||
|
||||
void UID::Set(bro_uint_t bits, const uint64_t* v, size_t n)
|
||||
void UID::Set(zeek_uint_t bits, const uint64_t* v, size_t n)
|
||||
{
|
||||
initialized = true;
|
||||
|
||||
for ( size_t i = 0; i < BRO_UID_LEN; ++i )
|
||||
for ( size_t i = 0; i < UID_LEN; ++i )
|
||||
uid[i] = 0;
|
||||
|
||||
if ( bits > BRO_UID_LEN * 64 )
|
||||
bits = BRO_UID_LEN * 64;
|
||||
if ( bits > UID_LEN * 64 )
|
||||
bits = UID_LEN * 64;
|
||||
|
||||
div_t res = div(bits, 64);
|
||||
size_t size = res.rem ? res.quot + 1 : res.quot;
|
||||
|
@ -38,7 +38,7 @@ std::string UID::Base62(std::string prefix) const
|
|||
reporter->InternalError("use of uninitialized UID");
|
||||
|
||||
char tmp[sizeof(uid) * 8 + 1]; // enough for even binary representation
|
||||
for ( size_t i = 0; i < BRO_UID_LEN; ++i )
|
||||
for ( size_t i = 0; i < UID_LEN; ++i )
|
||||
prefix.append(util::uitoa_n(uid[i], tmp, sizeof(tmp), 62));
|
||||
|
||||
return prefix;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue