[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[xen master] x86/ioapic: use NULL as a null pointer constant



commit 985fe473c04a077f6d9fd14db3b68df5044bd6ac
Author:     Nicola Vetrini <nicola.vetrini@xxxxxxxxxxx>
AuthorDate: Thu Dec 14 12:44:07 2023 +0100
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Tue Dec 19 13:49:29 2023 +0100

    x86/ioapic: use NULL as a null pointer constant
    
    Resolves violations of MISRA C Rule 11.9.
    No functional change.
    
    Signed-off-by: Nicola Vetrini <nicola.vetrini@xxxxxxxxxxx>
    Reviewed-by: Stefano Stabellini <sstabellini@xxxxxxxxxx>
    Acked-by: Jan Beulich <jbeulich@xxxxxxxx>
---
 xen/arch/x86/io_apic.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/xen/arch/x86/io_apic.c b/xen/arch/x86/io_apic.c
index d11c880544..dd25ba3943 100644
--- a/xen/arch/x86/io_apic.c
+++ b/xen/arch/x86/io_apic.c
@@ -207,7 +207,7 @@ struct IO_APIC_route_entry **alloc_ioapic_entries(void)
 
     ioapic_entries = xmalloc_array(struct IO_APIC_route_entry *, nr_ioapics);
     if (!ioapic_entries)
-        return 0;
+        return NULL;
 
     for (apic = 0; apic < nr_ioapics; apic++) {
         ioapic_entries[apic] =
@@ -224,7 +224,7 @@ nomem:
         xfree(ioapic_entries[apic]);
     xfree(ioapic_entries);
 
-    return 0;
+    return NULL;
 }
 
 union entry_union {
--
generated by git-patchbot for /home/xen/git/xen.git#master



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.