Don't use deprecated kIOMasterPortDefault
`kIOMasterPortDefault` is deprecated since macOS 12.0. One alternative is to use named constant `kIOMainPortDefault` which is not available before macOS 12.0. Both named constants are just an alias for `NULL`, so it is simpler to use it directly instead.
This commit is contained in:
committed by
Stéphane Lesimple
parent
e5f1eb1bd0
commit
e4753752d3
@@ -101,7 +101,7 @@ io_iterator_t getDVDIterator(char* ioClass)
|
|||||||
if (matchingDict == (CFMutableDictionaryRef) NULL) {
|
if (matchingDict == (CFMutableDictionaryRef) NULL) {
|
||||||
return (io_iterator_t) NULL;
|
return (io_iterator_t) NULL;
|
||||||
}
|
}
|
||||||
ioReturnValue = IOServiceGetMatchingServices(kIOMasterPortDefault, matchingDict, &scsiObjectIterator);
|
ioReturnValue = IOServiceGetMatchingServices(0, matchingDict, &scsiObjectIterator);
|
||||||
if (scsiObjectIterator == (io_iterator_t) NULL || (ioReturnValue != kIOReturnSuccess)) {
|
if (scsiObjectIterator == (io_iterator_t) NULL || (ioReturnValue != kIOReturnSuccess)) {
|
||||||
return (io_iterator_t) NULL;
|
return (io_iterator_t) NULL;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user