aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoan Lledó <jlledom@member.fsf.org>2020-05-31 09:20:33 +0200
committerJoan Lledó <jlledom@member.fsf.org>2020-05-31 09:30:45 +0200
commit32277f1d41242ad5c1c6aa4fd538caac93b6c0c2 (patch)
treed7b0e8dee288c7ee16e34301d6b06a3abc628b57
parent672b16511bd4f022926c3714fc1a4cbffaca8605 (diff)
downloadpciutils-32277f1d41242ad5c1c6aa4fd538caac93b6c0c2.tar.gz
HURD: Use MACH_PORT_NULL to initialize the port
-rw-r--r--lib/hurd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/hurd.c b/lib/hurd.c
index 389ca33..13d88ac 100644
--- a/lib/hurd.c
+++ b/lib/hurd.c
@@ -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);