From dc995a1448b90a8c8bbe730e3938cf42a0483991 Mon Sep 17 00:00:00 2001 From: Pragyansh Chaturvedi <76248539+r41k0u@users.noreply.github.com> Date: Sun, 30 Nov 2025 04:31:39 +0530 Subject: [PATCH] Fix variable initialization in BPF tracepoint example --- README.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 5b01b4f..61e29f9 100644 --- a/README.md +++ b/README.md @@ -88,15 +88,14 @@ def hist() -> HashMap: @section("tracepoint/syscalls/sys_enter_clone") def hello(ctx: c_void_p) -> c_int64: process_id = pid() - one = 1 prev = hist.lookup(process_id) if prev: previous_value = prev + 1 print(f"count: {previous_value} with {process_id}") hist.update(process_id, previous_value) - return c_int64(0) + return 0 else: - hist.update(process_id, one) + hist.update(process_id, 1) return 0