tools/vm/page_owner_sort.c: adjust the indent in is_need()
authorYixuan Cao <caoyixuan2019@email.szu.edu.cn>
Sun, 17 Jul 2022 19:55:06 +0000 (03:55 +0800)
committerakpm <akpm@linux-foundation.org>
Sat, 30 Jul 2022 01:07:16 +0000 (18:07 -0700)
I noticed one more indentation than necessary in is_need().

Link: https://lkml.kernel.org/r/20220717195506.7602-1-caoyixuan2019@email.szu.edu.cn
Signed-off-by: Yixuan Cao <caoyixuan2019@email.szu.edu.cn>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
tools/vm/page_owner_sort.c

index 74c3dce..ec2e67c 100644 (file)
@@ -470,23 +470,23 @@ static bool match_str_list(const char *str, char **list, int list_size)
 
 static bool is_need(char *buf)
 {
-               if ((filter & FILTER_UNRELEASE) && get_free_ts_nsec(buf) != 0)
-                       return false;
-               if ((filter & FILTER_PID) && !match_num_list(get_pid(buf), fc.pids, fc.pids_size))
-                       return false;
-               if ((filter & FILTER_TGID) &&
-                       !match_num_list(get_tgid(buf), fc.tgids, fc.tgids_size))
-                       return false;
-
-               char *comm = get_comm(buf);
-
-               if ((filter & FILTER_COMM) &&
-               !match_str_list(comm, fc.comms, fc.comms_size)) {
-                       free(comm);
-                       return false;
-               }
+       if ((filter & FILTER_UNRELEASE) && get_free_ts_nsec(buf) != 0)
+               return false;
+       if ((filter & FILTER_PID) && !match_num_list(get_pid(buf), fc.pids, fc.pids_size))
+               return false;
+       if ((filter & FILTER_TGID) &&
+               !match_num_list(get_tgid(buf), fc.tgids, fc.tgids_size))
+               return false;
+
+       char *comm = get_comm(buf);
+
+       if ((filter & FILTER_COMM) &&
+       !match_str_list(comm, fc.comms, fc.comms_size)) {
                free(comm);
-               return true;
+               return false;
+       }
+       free(comm);
+       return true;
 }
 
 static void add_list(char *buf, int len, char *ext_buf)