tools/mm: use <stdbool.h> in page_owner_sort.c
PATCH 1/1 tools/mm: use <stdbool.h> in page_owner_sort.c
From: Ye Liu <[email protected]>
Use standard <stdbool.h> instead of manually defining bool, true and false.
Signed-off-by Ye Liu <[email protected]>
--- tools/mm/page_owner_sort.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
tools/mm/page_owner_sort.c +4 -3
@@ -13,6 +13,7 @@#include <stdio.h> #include <stdlib.h> +#include <stdbool.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h>
@@ -23,9 +24,9 @@#include <linux/types.h> #include <getopt.h> -#define bool int -#define true 1 -#define false 0 +//#define bool int +//#define true 1 +//#define false 0 #define TASK_COMM_LEN 16struct block_list {
Signature · 1 line
2.43.0
Quoted 22 lines · Ye Liu
From: Ye Liu <[email protected]>
Use standard <
stdbool.h> instead of manually defining bool, true and false.Signed-off-by Ye Liu <[email protected]>--- tools/mm/page_owner_sort.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)tools/mm/page_owner_sort.c +1
-0@@ -13,6 +13,7 @@#include <stdio.h> #include <stdlib.h> +#include <stdbool.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h>
tools/mm/page_owner_sort.c line 30
Quoted 10 lines
tools/mm/page_owner_sort.c +3
-3@@ -23,9 +24,9 @@#include <linux/types.h> #include <getopt.h> -#define bool int -#define true 1 -#define false 0 +//#define bool int +//#define true 1 +//#define false 0 #define TASK_COMM_LEN 16
You forgot to remove these :)
Quoted 2 lines
tools/mm/page_owner_sort.c +0
-0struct block_list {
Quoted 26 lines · Dev Jain
Quoted 24 lines · Ye Liu
From: Ye Liu <[email protected]>
Use standard <
stdbool.h> instead of manually defining bool, true and false.Signed-off-by Ye Liu <[email protected]>---
tools/mm/page_owner_sort.c| 7 ++++---1 file changed, 4 insertions(+), 3 deletions(-)tools/mm/page_owner_sort.c +1
-0@@ -13,6 +13,7 @@ #include <stdio.h> #include <stdlib.h> +#include <stdbool.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h>@@ -23,9 +24,9 @@ #include <linux/types.h> #include <getopt.h>-#define bool int
Quoted 8 lines
Quoted 6 lines
tools/mm/page_owner_sort.c +3
-2-#define true 1 -#define false 0 +//#define bool int +//#define true 1 +//#define false 0 #define
TASK_COMM_LEN16You forgot to remove these :)
Oops, you're right — I’ll drop those lines and send a v2. :) Thanks!>
Quoted 1 line
Quoted 1 line
struct
block_list{
Signature · 2 lines
Thanks, Ye Liu