diff options
| author | Xu Kuohai <xukuohai@huawei.com> | 2022-10-18 17:55:38 +0300 |
|---|---|---|
| committer | Andrii Nakryiko <andrii@kernel.org> | 2022-10-22 00:28:14 +0300 |
| commit | d9740535b857650bd6211a67ac0c0d574cba1dce (patch) | |
| tree | 901bf64f17d5db7d104d9537327414e93700c42b /include/linux/fpga/fpga-bridge.h | |
| parent | eb814cf1adea0ce24413c26c22e9f1a556a45d34 (diff) | |
| download | linux-d9740535b857650bd6211a67ac0c0d574cba1dce.tar.xz | |
libbpf: Avoid allocating reg_name with sscanf in parse_usdt_arg()
The reg_name in parse_usdt_arg() is used to hold register name, which
is short enough to be held in a 16-byte array, so we could define
reg_name as char reg_name[16] to avoid dynamically allocating reg_name
with sscanf.
Suggested-by: Andrii Nakryiko <andrii.nakryiko@gmail.com>
Signed-off-by: Xu Kuohai <xukuohai@huawei.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Acked-by: Stanislav Fomichev <sdf@google.com>
Link: https://lore.kernel.org/bpf/20221018145538.2046842-1-xukuohai@huaweicloud.com
Diffstat (limited to 'include/linux/fpga/fpga-bridge.h')
0 files changed, 0 insertions, 0 deletions
