From 5ab05143219089c8a35caa12eab1ca5ed1de46e7 Mon Sep 17 00:00:00 2001 From: Peter Wemm Date: Sat, 20 Nov 1999 14:56:55 +0000 Subject: Allow NULL for startp and/or countp in bus_get_resource() so that you can get one of the two without having to use a dummy variable. --- sys/dev/pci/pci.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'sys/dev/pci') diff --git a/sys/dev/pci/pci.c b/sys/dev/pci/pci.c index 8cb59433c2e72..4a36158c8996c 100644 --- a/sys/dev/pci/pci.c +++ b/sys/dev/pci/pci.c @@ -1333,8 +1333,10 @@ pci_get_resource(device_t dev, device_t child, int type, int rid, if (!rle) return ENOENT; - *startp = rle->start; - *countp = rle->count; + if (startp) + *startp = rle->start; + if (countp) + *countp = rle->count; return 0; } -- cgit v1.3