kernel: Use NULL for pointers.
authorSascha Wildner <saw@online.de>
Sun, 13 Jul 2014 09:52:31 +0000 (11:52 +0200)
committerSascha Wildner <saw@online.de>
Sun, 13 Jul 2014 09:52:31 +0000 (11:52 +0200)
sys/bus/u4b/net/if_urndis.c
sys/bus/u4b/usb_device.c
sys/dev/raid/arcmsr/arcmsr.c
sys/dev/raid/mrsas/mrsas_ioctl.c

index c21a2b3..d88f3ff 100644 (file)
@@ -215,7 +215,7 @@ urndis_attach(device_t dev)
 
        cmd = usbd_find_descriptor(uaa->device, NULL, uaa->info.bIfaceIndex,
            UDESC_CS_INTERFACE, 0xFF, UDESCSUB_CDC_CM, 0xFF);
-       if (cmd != 0) {
+       if (cmd != NULL) {
                DPRINTF("Call Mode Descriptor found, dataif=%d\n", cmd->bDataInterface);
                iface_index[0] = cmd->bDataInterface;
        }
index ec0c069..4496e72 100644 (file)
@@ -2527,7 +2527,7 @@ usb_notify_addq(const char *type, struct usb_device *udev)
                if (iface->idesc == NULL)
                        continue;       /* no interface descriptor */
                
-               sb = 0;
+               sb = NULL;
                sb = sbuf_new(NULL, NULL, 4096, SBUF_AUTOEXTEND);
                sbuf_printf(sb,
 #if USB_HAVE_UGEN
index 99d72b3..6267718 100644 (file)
@@ -1321,8 +1321,8 @@ static u_int32_t arcmsr_Read_iop_rqbuffer_data_D(struct AdapterControlBlock *acb
     struct QBUFFER *prbuffer) {
 
        u_int8_t *pQbuffer;
-       u_int8_t *buf1 = 0;
-       u_int32_t *iop_data, *buf2 = 0;
+       u_int8_t *buf1 = NULL;
+       u_int32_t *iop_data, *buf2 = NULL;
        u_int32_t iop_len, data_len;
 
        iop_data = (u_int32_t *)prbuffer->data;
@@ -1417,8 +1417,8 @@ static void arcmsr_Write_data_2iop_wqbuffer_D(struct AdapterControlBlock *acb)
 {
        u_int8_t *pQbuffer;
        struct QBUFFER *pwbuffer;
-       u_int8_t *buf1 = 0;
-       u_int32_t *iop_data, *buf2 = 0;
+       u_int8_t *buf1 = NULL;
+       u_int32_t *iop_data, *buf2 = NULL;
        u_int32_t allxfer_len = 0, data_len;
        
        if(acb->acb_flags & ACB_F_MESSAGE_WQBUFFER_READ) {
index cc1c3ff..88b730a 100644 (file)
@@ -156,7 +156,7 @@ int mrsas_passthru( struct mrsas_softc *sc, void *arg )
     bus_addr_t ioctl_data_phys_addr[MAX_IOCTL_SGE]; // ioctl data phys addr
     bus_dma_tag_t ioctl_sense_tag = 0;
     bus_dmamap_t ioctl_sense_dmamap = 0;
-    void *ioctl_sense_mem = 0;  
+    void *ioctl_sense_mem = NULL;  
     bus_addr_t ioctl_sense_phys_addr = 0; 
     int i, adapter, ioctl_data_size, ioctl_sense_size, ret=0;
     struct mrsas_sge32 *kern_sge32;