mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
Merge remote-tracking branch 'origin/topic/jsiwek/32bit-compat'
* origin/topic/jsiwek/32bit-compat: Improve formatting of doubles that are close to integers Improve HTTP version number comparisons Add a 32-bit task to Cirrus CI config Replace va_list fmt() overload with vfmt() Format tables indexed by patterns consistently across 32-bit/64-bit Format interval values consistently across 32-bit/64-bit platforms
This commit is contained in:
commit
822567b3f9
17 changed files with 164 additions and 42 deletions
|
@ -154,10 +154,10 @@ char* CompositeHash::SingleValHash(int type_check, char* kp0,
|
|||
v->AsPattern()->AnywherePatternText()
|
||||
};
|
||||
|
||||
size_t* kp;
|
||||
uint64_t* kp;
|
||||
for ( int i = 0; i < 2; i++ )
|
||||
{
|
||||
kp = AlignAndPadType<size_t>(kp0+i);
|
||||
kp = AlignAndPadType<uint64_t>(kp0+i);
|
||||
*kp = strlen(texts[i]) + 1;
|
||||
}
|
||||
|
||||
|
@ -505,7 +505,7 @@ int CompositeHash::SingleTypeKeySize(BroType* bt, const Val* v,
|
|||
if ( ! v )
|
||||
return (optional && ! calc_static_size) ? sz : 0;
|
||||
|
||||
sz = SizeAlign(sz, 2 * sizeof(size_t));
|
||||
sz = SizeAlign(sz, 2 * sizeof(uint64_t));
|
||||
sz += strlen(v->AsPattern()->PatternText())
|
||||
+ strlen(v->AsPattern()->AnywherePatternText()) + 2; // 2 for null terminators
|
||||
break;
|
||||
|
@ -892,7 +892,7 @@ const char* CompositeHash::RecoverOneVal(const HashKey* k, const char* kp0,
|
|||
}
|
||||
else
|
||||
{
|
||||
const size_t* const len = AlignType<size_t>(kp0);
|
||||
const uint64_t* const len = AlignType<uint64_t>(kp0);
|
||||
|
||||
kp1 = reinterpret_cast<const char*>(len+2);
|
||||
re = new RE_Matcher(kp1, kp1 + len[0]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue