]> git.baikalelectronics.ru Git - kernel.git/commit
bpftool: Replace sizeof(arr)/sizeof(arr[0]) with ARRAY_SIZE macro
authorRongguang Wei <weirongguang@kylinos.cn>
Tue, 26 Jul 2022 09:30:45 +0000 (17:30 +0800)
committerAndrii Nakryiko <andrii@kernel.org>
Fri, 29 Jul 2022 17:40:51 +0000 (10:40 -0700)
commitd8b1894ea8c3b6a9fb068594fb6e373401f39e65
treeeea924fb22caecc8a815801ffd8338247afcda8f
parent0399b39226d0f6993cb3dbf095f9b3b623fc49d4
bpftool: Replace sizeof(arr)/sizeof(arr[0]) with ARRAY_SIZE macro

Use the ARRAY_SIZE macro and make the code more compact.

Signed-off-by: Rongguang Wei <weirongguang@kylinos.cn>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Reviewed-by: Quentin Monnet <quentin@isovalent.com>
Link: https://lore.kernel.org/bpf/20220726093045.3374026-1-clementwei90@163.com
tools/bpf/bpftool/prog.c