0 -> NULL, for arch/um
Subsystems (2)
PATCH 18/68 0 -> NULL, for arch/um
When comparing a pointer, it's clearer to compare it to NULL than to 0.
Here is an excerpt of the semantic patch:
@@
expression *E;
@@
E =
- 0
+ NULL
@@
expression *E;
@@
E !- 0
+ NULL
Signed-off-by Yoann Padioleau <[email protected]>
---
sys-i386/fault.c | 2 +- sys-x86_64/fault.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
arch/um/sys-i386/fault.c +1 -1
@@ -20,7 +20,7 @@ int arch_fixup(unsigned long address, unconst struct exception_table_entry *fixup; fixup =search_exception_tables (address); -if (fixup !=0 ){ +if (fixup !=NULL ){UPT_IP (regs) = fixup->fixup;return (1 ); }
arch/um/sys-x86_64/fault.c +1 -1
@@ -19,7 +19,7 @@ int arch_fixup(unsigned long address, unconst struct exception_table_entry *fixup; fixup =search_exception_tables (address); -if (fixup !=0 ){ +if (fixup !=NULL ){UPT_IP (regs) = fixup->fixup;return (1 ); }
Quoted 1 line · Yoann Padioleau
When comparing a pointer, it's clearer to compare it to NULL than to 0.
ACK
Quoted 3 lines
sys-i386/fault.c | 2 +- sys-x86_64/fault.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
Except you should probably diff from the top of the kernel tree.
Jeff
Signature · 1 line
Work email - jdike at linux dot intel dot com
Quoted 10 lines · Jeff Dike
Quoted 1 line · Yoann Padioleau
When comparing a pointer, it's clearer to compare it to NULL than to 0.
ACK
Quoted 3 lines
sys-i386/fault.c | 2 +- sys-x86_64/fault.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)Except you should probably diff from the top of the kernel tree.
Sorry. I will use diffstat -p1 from now on.
Quoted 5 lines
Jeff
Signature · 1 line
Work email - jdike at linux dot intel dot com