Skip to content

Commit beaad99

Browse files
committed
Fix map access syntax in examples/xdp_pass
1 parent 99b92e4 commit beaad99

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

examples/xdp_pass.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,14 @@ def count() -> HashMap:
2323
def hello_world(ctx: c_void_p) -> c_int64:
2424
key = 0
2525
one = 1
26-
prev = count().lookup(key)
26+
prev = count.lookup(key)
2727
if prev:
2828
prevval = prev + 1
2929
print(f"count: {prevval}")
30-
count().update(key, prevval)
30+
count.update(key, prevval)
3131
return XDP_PASS
3232
else:
33-
count().update(key, one)
33+
count.update(key, one)
3434

3535
return XDP_PASS
3636

0 commit comments

Comments
 (0)