diff --git a/utils/meta_parameters.rb b/utils/meta_parameters.rb index d0c217ed..2c3be8c7 100644 --- a/utils/meta_parameters.rb +++ b/utils/meta_parameters.rb @@ -217,7 +217,7 @@ def initialize(command, name, size) size = "*#{size}" size = "(#{size} < 0 ? 0 : (size_t)#{size})" if INT_SIGN_MAP["#{s.type.type}"] sz = sanitize_expression("#{size}", checks) - st = INT_SIGN_MAP["#{s.type.type}"] ? "size_t" : "#{s.type}" + st = INT_SIGN_MAP["#{s.type.type}"] ? "size_t" : "#{s.type.type}" else checks = check_for_null("#{name}") size = "(#{size} < 0 ? 0 : (size_t)#{size})" if INT_SIGN_MAP["#{s.type}"] diff --git a/utils/yaml_ast_lttng.rb b/utils/yaml_ast_lttng.rb index acce44aa..6016dabc 100644 --- a/utils/yaml_ast_lttng.rb +++ b/utils/yaml_ast_lttng.rb @@ -184,6 +184,7 @@ def lttng_type(length: nil, length_type: nil) ev.type = :uint8_t if ev.length ev.length = "(#{ev.length}) * sizeof(uint8_t)" + ev.length_type = "size_t" end when *OBJECT_TYPES, *POINTER_TYPES ev.macro = :"ctf_#{lttng_arr_type}_hex" @@ -202,6 +203,7 @@ def lttng_type(length: nil, length_type: nil) ev.type = :uint8_t if ev.length ev.length = "(#{ev.length}) * sizeof(#{type.name})" + ev.length_type = "size_t" end else super