scripts: ssl_session_reset_check: fix check for special fields in _get_element_type

The previous check was completely wrong since it was comparing objects
of different types. The only things that need to be checked here is that
'name' appears in the FieldsInfo.special dictionary.

Signed-off-by: Valerio Setti <[email protected]>
This commit is contained in:
Valerio Setti
2026-06-24 09:00:45 +02:00
parent 0f8b282730
commit fb70ecde4e
@@ -131,7 +131,7 @@ class CStruct:
"""Return structure field type based on either its name or the fact
that it belongs to the list of special symbols/named structures"""
# Check for fields with custom check rules
if self.fields_info.special.get(name, None) == ResetBehavior.SPECIAL:
if name in self.fields_info.special:
return ElementType.SPECIAL
# Check for named structures
if name in self.fields_info.named_structures: