diff options
author | Joan Lledó <jlledom@member.fsf.org> | 2020-05-31 09:20:33 +0200 |
---|---|---|
committer | Joan Lledó <jlledom@member.fsf.org> | 2020-05-31 09:30:45 +0200 |
commit | 32277f1d41242ad5c1c6aa4fd538caac93b6c0c2 (patch) | |
tree | d7b0e8dee288c7ee16e34301d6b06a3abc628b57 | |
parent | 672b16511bd4f022926c3714fc1a4cbffaca8605 (diff) | |
download | pciutils-32277f1d41242ad5c1c6aa4fd538caac93b6c0c2.tar.gz |
HURD: Use MACH_PORT_NULL to initialize the port
-rw-r--r-- | lib/hurd.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -73,7 +73,7 @@ static void hurd_init_dev(struct pci_dev *d) { d->aux = pci_malloc(d->access, sizeof(mach_port_t)); - *((mach_port_t *) d->aux) = 0; + *((mach_port_t *) d->aux) = MACH_PORT_NULL; } /* Deallocate the port and free its space */ @@ -232,7 +232,7 @@ hurd_read(struct pci_dev *d, int pos, byte * buf, int len) mach_port_t device_port; nread = len; - if (*((mach_port_t *) d->aux) == 0) + if (*((mach_port_t *) d->aux) == MACH_PORT_NULL) { /* We still don't have the port for this device */ device_port_lookup(d); @@ -281,7 +281,7 @@ hurd_write(struct pci_dev *d, int pos, byte * buf, int len) mach_port_t device_port; nwrote = len; - if (*((mach_port_t *) d->aux) == 0) + if (*((mach_port_t *) d->aux) == MACH_PORT_NULL) { /* We still don't have the port for this device */ device_port_lookup(d); |