Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions tools/lib/bpf/libbpf.c
Original file line number Diff line number Diff line change
Expand Up @@ -8484,7 +8484,7 @@ static int kallsyms_cb(unsigned long long sym_addr, char sym_type,
struct bpf_object *obj = ctx;
const struct btf_type *t;
struct extern_desc *ext;
char *res;
const char *res;

res = strstr(sym_name, ".llvm.");
if (sym_type == 'd' && res)
Expand Down Expand Up @@ -11822,7 +11822,7 @@ static int avail_kallsyms_cb(unsigned long long sym_addr, char sym_type,
*/
char sym_trim[256], *psym_trim = sym_trim, *sym_sfx;

if (!(sym_sfx = strstr(sym_name, ".llvm.")))
if (!(sym_sfx = (char *)strstr(sym_name, ".llvm."))) /* needs mutation */
return 0;

/* psym_trim vs sym_trim dance is done to avoid pointer vs array
Expand Down Expand Up @@ -12410,7 +12410,7 @@ static int resolve_full_path(const char *file, char *result, size_t result_sz)

if (s[0] == ':')
s++;
next_path = strchr(s, ':');
next_path = (char *)strchr(s, ':'); /* declared as char * above */
seg_len = next_path ? next_path - s : strlen(s);
if (!seg_len)
continue;
Expand Down
Loading