From 5b4fc9ea93f32da4c58be4b261905b883c9ea20b Mon Sep 17 00:00:00 2001 From: Quentin JEROME Date: Wed, 19 Apr 2023 11:49:54 +0200 Subject: [PATCH] removed useless line break and comments Signed-off-by: Quentin JEROME --- aya-obj/src/btf/btf.rs | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/aya-obj/src/btf/btf.rs b/aya-obj/src/btf/btf.rs index 9b3b1199..8a9a3067 100644 --- a/aya-obj/src/btf/btf.rs +++ b/aya-obj/src/btf/btf.rs @@ -412,7 +412,6 @@ impl Btf { features: &BtfFeatures, ) -> Result<(), BtfError> { let mut types = mem::take(&mut self.types); - for i in 0..types.types.len() { let t = &types.types[i]; let kind = t.kind(); @@ -536,7 +535,6 @@ impl Btf { let enum_type = BtfType::Enum(Enum::new(ty.name_offset, members)); types.types[i] = enum_type; } - // Sanitize FUNC BtfType::Func(ty) => { let name = self.string_at(ty.name_offset)?; @@ -562,22 +560,7 @@ impl Btf { } types.types[i] = BtfType::Func(fixed_ty); } - - // Sanitize BTF_FUNC_GLOBAL and memset, memcpy - /*let name = self.string_at(ty.name_offset)?; - if !features.btf_func_global || name == "memset" || name == "memcpy" { - let mut fixed_ty = ty.clone(); - if ty.linkage() == FuncLinkage::Global { - debug!( - "{}: BTF_FUNC_GLOBAL not supported. replacing with BTF_FUNC_STATIC", - kind - ); - fixed_ty.set_linkage(FuncLinkage::Static); - } - types.types[i] = BtfType::Func(fixed_ty); - }*/ } - // Sanitize FLOAT BtfType::Float(ty) if !features.btf_float => { debug!("{}: not supported. replacing with STRUCT", kind);