提交 c7694ac3 编写于 作者: K Kang Minchul 提交者: Andrii Nakryiko

libbpf: checkpatch: Fixed code alignments in btf.c

Fixed some checkpatch issues in btf.c
Signed-off-by: NKang Minchul <tegongkang@gmail.com>
Signed-off-by: NAndrii Nakryiko <andrii@kernel.org>
Acked-by: NStanislav Fomichev <sdf@google.com>
Link: https://lore.kernel.org/bpf/20221113190648.38556-2-tegongkang@gmail.com
上级 e662c775
...@@ -1724,7 +1724,8 @@ int btf__add_btf(struct btf *btf, const struct btf *src_btf) ...@@ -1724,7 +1724,8 @@ int btf__add_btf(struct btf *btf, const struct btf *src_btf)
memset(btf->strs_data + old_strs_len, 0, btf->hdr->str_len - old_strs_len); memset(btf->strs_data + old_strs_len, 0, btf->hdr->str_len - old_strs_len);
/* and now restore original strings section size; types data size /* and now restore original strings section size; types data size
* wasn't modified, so doesn't need restoring, see big comment above */ * wasn't modified, so doesn't need restoring, see big comment above
*/
btf->hdr->str_len = old_strs_len; btf->hdr->str_len = old_strs_len;
hashmap__free(p.str_off_map); hashmap__free(p.str_off_map);
...@@ -2329,7 +2330,7 @@ int btf__add_restrict(struct btf *btf, int ref_type_id) ...@@ -2329,7 +2330,7 @@ int btf__add_restrict(struct btf *btf, int ref_type_id)
*/ */
int btf__add_type_tag(struct btf *btf, const char *value, int ref_type_id) int btf__add_type_tag(struct btf *btf, const char *value, int ref_type_id)
{ {
if (!value|| !value[0]) if (!value || !value[0])
return libbpf_err(-EINVAL); return libbpf_err(-EINVAL);
return btf_add_ref_kind(btf, BTF_KIND_TYPE_TAG, value, ref_type_id); return btf_add_ref_kind(btf, BTF_KIND_TYPE_TAG, value, ref_type_id);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册