Commit e0eb6082 authored by Donald Hunter's avatar Donald Hunter Committed by Alexei Starovoitov

docs/bpf: Fix sample code in MAP_TYPE_ARRAY docs

Remove mistaken & from code example in MAP_TYPE_ARRAY docs

Fixes: 1cfa97b3 ("bpf, docs: Document BPF_MAP_TYPE_ARRAY")
Signed-off-by: default avatarDonald Hunter <donald.hunter@gmail.com>
Link: https://lore.kernel.org/r/20221115095910.86407-1-donald.hunter@gmail.comSigned-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
parent 6373ef1c
......@@ -119,7 +119,7 @@ This example BPF program shows how to access an array element.
index = ip.protocol;
value = bpf_map_lookup_elem(&my_map, &index);
if (value)
__sync_fetch_and_add(&value, skb->len);
__sync_fetch_and_add(value, skb->len);
return 0;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment