lkml.org 
[lkml]   [2021]   [Dec]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] tools/vm/page_owner_sort.c: delete invalid duplicate code
Date
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


\
 
 \ /
  Last update: 2021-12-13 11:10    [W:0.027 / U:0.148 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site