Messages in this thread Patch in this message | | | From | Yixuan Cao <> | Subject | [PATCH] tools/vm/page_owner_sort.c: delete invalid duplicate code | Date | Mon, 13 Dec 2021 17:57:43 +0800 |
| |
I noticed that there is two invalid lines of duplicate code. It's better to delete it.
Signed-off-by: Yixuan Cao <caoyixuan2019@email.szu.edu.cn> --- tools/vm/page_owner_sort.c | 2 -- 1 file changed, 2 deletions(-)
diff --git a/tools/vm/page_owner_sort.c b/tools/vm/page_owner_sort.c index c9fedc1806d5..e76addb2bfe7 100644 --- a/tools/vm/page_owner_sort.c +++ b/tools/vm/page_owner_sort.c @@ -229,8 +229,6 @@ static void add_list(char *buf, int len) list[list_size].pid = get_pid(buf); list[list_size].ts_nsec = get_ts_nsec(buf); list[list_size].free_ts_nsec = get_free_ts_nsec(buf); - memcpy(list[list_size].txt, buf, len); - list[list_size].txt[len] = 0; list_size++; if (list_size % 1000 == 0) { printf("loaded %d\r", list_size); -- 2.31.1
| |