[PATCH]Replace 0 with NULL when returning a pointer

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Cong WANG
Date: Sunday, March 11, 2007 - 11:50 pm

Use NULL to indicate we are returning a pointer rather than an integer
and to eliminate some sparse warnings.

Signed-off-by: Cong WANG <xiyou.wangcong@gmail.com>
---
--- drivers/kvm/vmx.c.orig	2007-03-11 21:41:03.000000000 +0800
+++ drivers/kvm/vmx.c	2007-03-12 14:25:11.000000000 +0800
@@ -98,7 +98,7 @@ static struct vmx_msr_entry *find_msr_en
 	for (i = 0; i < vcpu->nmsrs; ++i)
 		if (vcpu->guest_msrs[i].index == msr)
 			return &vcpu->guest_msrs[i];
-	return 0;
+	return NULL;
 }

 static void vmcs_clear(struct vmcs *vmcs)
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH]Replace 0 with NULL when returning a pointer, Cong WANG, (Sun Mar 11, 11:50 pm)