Skip to content

Commit f135cdb

Browse files
format chore
1 parent a8595ff commit f135cdb

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

pythonbpf/vmlinux_parser/vmlinux_exports_handler.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ def load_struct_field(
145145
field_data,
146146
struct_name=None,
147147
local_sym_tab=None,
148-
tmp_name: str = None,
148+
tmp_name: str | None = None,
149149
):
150150
"""
151151
Generate LLVM IR to load a field from a regular (non-context) struct using bpf_probe_read_kernel.
@@ -231,9 +231,7 @@ def load_struct_field(
231231
# Fallback: allocate inline (not ideal, but preserves behavior)
232232
local_storage = builder.alloca(ir.IntType(int_width))
233233
local_storage_i8_ptr = builder.bitcast(local_storage, i8_ptr_type)
234-
logger.warning(
235-
f"Temp storage '{tmp_name}' not found. Allocating inline"
236-
)
234+
logger.warning(f"Temp storage '{tmp_name}' not found. Allocating inline")
237235

238236
# Use bpf_probe_read_kernel to safely read the field
239237
# This generates:
@@ -247,7 +245,9 @@ def load_struct_field(
247245
)
248246

249247
# Load the value from local storage
250-
value = builder.load(builder.bitcast(local_storage_i8_ptr, ir.PointerType(ir.IntType(int_width))))
248+
value = builder.load(
249+
builder.bitcast(local_storage_i8_ptr, ir.PointerType(ir.IntType(int_width)))
250+
)
251251

252252
# Zero-extend i32 to i64 if needed
253253
if needs_zext:

0 commit comments

Comments
 (0)