* [PATCH 09/68] 0 -> NULL, for arch/m68knommu
@ 2007-07-27 9:44 Yoann Padioleau
2007-07-30 0:40 ` Greg Ungerer
0 siblings, 1 reply; 2+ messages in thread
From: Yoann Padioleau @ 2007-07-27 9:44 UTC (permalink / raw)
To: kernel-janitors; +Cc: gerg, akpm, linux-kernel
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 <padator@wanadoo.fr>
Cc: gerg@uclinux.org
Cc: akpm@linux-foundation.org
---
comempci.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/m68knommu/kernel/comempci.c b/arch/m68knommu/kernel/comempci.c
index 6ee00ef..528517e 100644
--- a/arch/m68knommu/kernel/comempci.c
+++ b/arch/m68knommu/kernel/comempci.c
@@ -736,7 +736,7 @@ #endif
/* Find a free spot to put this handler */
for (i = 0; (i < COMEM_MAXPCI); i++) {
- if (pci_irqlist[i].handler = 0) {
+ if (pci_irqlist[i].handler = NULL) {
pci_irqlist[i].handler = handler;
pci_irqlist[i].device = device;
pci_irqlist[i].dev_id = dev_id;
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 09/68] 0 -> NULL, for arch/m68knommu
2007-07-27 9:44 [PATCH 09/68] 0 -> NULL, for arch/m68knommu Yoann Padioleau
@ 2007-07-30 0:40 ` Greg Ungerer
0 siblings, 0 replies; 2+ messages in thread
From: Greg Ungerer @ 2007-07-30 0:40 UTC (permalink / raw)
To: Yoann Padioleau; +Cc: kernel-janitors, akpm, linux-kernel
Hi Yoann,
Yoann Padioleau wrote:
> When comparing a pointer, it's clearer to compare it to NULL than to 0.
>
> Signed-off-by: Yoann Padioleau <padator@wanadoo.fr>
> Cc: gerg@uclinux.org
Acked-by: Greg Ungerer <gerg@uclinux.org>
> Cc: akpm@linux-foundation.org
> ---
>
> comempci.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/m68knommu/kernel/comempci.c b/arch/m68knommu/kernel/comempci.c
> index 6ee00ef..528517e 100644
> --- a/arch/m68knommu/kernel/comempci.c
> +++ b/arch/m68knommu/kernel/comempci.c
> @@ -736,7 +736,7 @@ #endif
>
> /* Find a free spot to put this handler */
> for (i = 0; (i < COMEM_MAXPCI); i++) {
> - if (pci_irqlist[i].handler = 0) {
> + if (pci_irqlist[i].handler = NULL) {
> pci_irqlist[i].handler = handler;
> pci_irqlist[i].device = device;
> pci_irqlist[i].dev_id = dev_id;
>
>
--
------------------------------------------------------------------------
Greg Ungerer -- Chief Software Dude EMAIL: gerg@snapgear.com
Secure Computing Corporation PHONE: +61 7 3435 2888
825 Stanley St, FAX: +61 7 3891 3630
Woolloongabba, QLD, 4102, Australia WEB: http://www.SnapGear.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-07-30 0:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-27 9:44 [PATCH 09/68] 0 -> NULL, for arch/m68knommu Yoann Padioleau
2007-07-30 0:40 ` Greg Ungerer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).