mirror of
https://github.com/opnsense/src.git
synced 2026-06-11 09:41:03 -04:00
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.
This commit is contained in:
parent
32fc781e06
commit
5ab0514321
4 changed files with 16 additions and 8 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -869,8 +869,10 @@ isa_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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue