summaryrefslogtreecommitdiffstats
path: root/sys/pccard/pccard_nbk.c
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1999-11-20 14:56:55 +0000
committerpeter <peter@FreeBSD.org>1999-11-20 14:56:55 +0000
commit23264e706260a6b0c95f24137f7012b045b1d5c8 (patch)
tree5642b41a20062a39e1f394b18a8af675f2d0611a /sys/pccard/pccard_nbk.c
parent75d26bf57405e325ab98e1c789f13cfd1cbdb9a2 (diff)
downloadFreeBSD-src-23264e706260a6b0c95f24137f7012b045b1d5c8.zip
FreeBSD-src-23264e706260a6b0c95f24137f7012b045b1d5c8.tar.gz
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.
Diffstat (limited to 'sys/pccard/pccard_nbk.c')
-rw-r--r--sys/pccard/pccard_nbk.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/pccard/pccard_nbk.c b/sys/pccard/pccard_nbk.c
index 264b96e..b091363 100644
--- a/sys/pccard/pccard_nbk.c
+++ b/sys/pccard/pccard_nbk.c
@@ -178,8 +178,10 @@ pccard_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;
}
OpenPOWER on IntegriCloud