modified merge_types() to skip work if given identical types, which

also preserves type names (useful for -O gen-C++)

(cherry picked from commit 7ed3f79c87)
This commit is contained in:
Vern Paxson 2024-12-06 16:16:35 -08:00 committed by Tim Wojtulewicz
parent 0624a652ec
commit 9ff78da69a
3 changed files with 11 additions and 1 deletions

View file

@ -1,3 +1,10 @@
7.0.9-2 | 2025-08-22 13:02:51 -0700
* modified merge_types() to skip work if given identical types, which (Vern Paxson, Corelight)
also preserves type names (useful for -O gen-C++)
(cherry picked from commit 7ed3f79c87f2cda1fde37b3fc6b6e272360e3b3d)
7.0.9-1 | 2025-08-22 13:00:59 -0700
* smb2/read: Parse only 1 byte for data_offset, ignore reserved1 (Arne Welzel, Corelight)

View file

@ -1 +1 @@
7.0.9-1
7.0.9-2

View file

@ -2357,6 +2357,9 @@ TypeListPtr merge_list_types(const Type* t1, const Type* t2) {
}
TypePtr merge_types(const TypePtr& arg_t1, const TypePtr& arg_t2) {
if ( arg_t1 == arg_t2 )
return arg_t1;
auto t1 = arg_t1.get();
auto t2 = arg_t2.get();
// t1 = flatten_type(t1);