add trace-cmd
[openwrt/staging/yousong.git] / package / devel / trace-cmd / patches / 110-fix_sscanf_alloc.patch
1 --- a/trace-util.c
2 +++ b/trace-util.c
3 @@ -110,7 +110,7 @@ void parse_cmdlines(struct pevent *peven
4
5 line = strtok_r(file, "\n", &next);
6 while (line) {
7 - sscanf(line, "%d %as", &pid,
8 + sscanf(line, "%d %ms", &pid,
9 (float *)(void *)&comm); /* workaround gcc warning */
10 pevent_register_comm(pevent, comm, pid);
11 free(comm);
12 @@ -133,7 +133,7 @@ void parse_proc_kallsyms(struct pevent *
13 line = strtok_r(file, "\n", &next);
14 while (line) {
15 mod = NULL;
16 - ret = sscanf(line, "%as %c %as\t[%as",
17 + ret = sscanf(line, "%ms %c %ms\t[%ms",
18 (float *)(void *)&addr_str, /* workaround gcc warning */
19 &ch,
20 (float *)(void *)&func,