IOStateReporter::with(IOService *reportingService,
IOReportCategories categories,
int nstates,
- IOReportUnits unit/* = kIOReportUnitHWTicks*/)
+ IOReportUnit unit/* = kIOReportUnitHWTicks*/)
{
IOStateReporter *reporter, *rval = NULL;
finish:
if (!rval) {
- if (reporter) delete reporter;
+ OSSafeReleaseNULL(reporter);
}
return rval;
IOStateReporter::initWith(IOService *reportingService,
IOReportCategories categories,
int16_t nstates,
- IOReportUnits unit)
+ IOReportUnit unit)
{
bool success = false;
break;
case kLastTransitionTime:
result = values->last_intransition;
+ break;
default:
break;
}