We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ef36ea1 commit c7f2955Copy full SHA for c7f2955
pythonbpf/functions_pass.py
@@ -411,7 +411,7 @@ def process_stmt(
411
raise ValueError("Failed to evaluate return expression")
412
if val[1] != ret_type:
413
raise ValueError(
414
- "Return type mismatch: expected" f"{ret_type}, got {val[1]}"
+ "Return type mismatch: expected " f"{ret_type}, got {val[1]}"
415
)
416
builder.ret(val[0])
417
did_return = True
@@ -480,6 +480,9 @@ def allocate_mem(
480
continue
481
var_name = target.id
482
rval = stmt.value
483
+ if var_name in local_sym_tab:
484
+ logger.info(f"Variable {var_name} already allocated")
485
+ continue
486
if isinstance(rval, ast.Call):
487
if isinstance(rval.func, ast.Name):
488
call_type = rval.func.id
0 commit comments