diags = new IOKitDiagnostics;
if (diags && !diags->init()) {
diags->release();
- diags = 0;
+ diags = NULL;
}
return diags;
lock->count++;
} else {
lck_mtx_lock(lock->mutex);
- assert(lock->thread == 0);
+ assert(lock->thread == NULL);
assert(lock->count == 0);
lock->thread = current_thread();
lock->count = 1;
{
assert(lock->thread == current_thread());
if (0 == (--lock->count)) {
- lock->thread = 0;
+ lock->thread = NULL;
lck_mtx_unlock(lock->mutex);
}
}
assert(!mem->link.next);
- num = backtrace(&mem->bt[0], kIOTrackingCallSiteBTs);
+ num = backtrace(&mem->bt[0], kIOTrackingCallSiteBTs, NULL);
num = 0;
if ((kernel_task != current_task()) && (self = proc_self())) {
- bool user_64;
+ bool user_64 = false;
mem->btPID = proc_pid(self);
(void)backtrace_user(&mem->btUser[0], kIOTrackingCallSiteBTs - 1, &num,
- &user_64);
+ &user_64, NULL);
mem->user32 = !user_64;
proc_rele(self);
}
assert(!mem->link.next);
- num = backtrace(&bt[0], kIOTrackingCallSiteBTs + 1);
+ num = backtrace(&bt[0], kIOTrackingCallSiteBTs + 1, NULL);
if (!num) {
return;
}
for (ptrIdx = 0; ptrIdx < (page_size / sizeof(uintptr_t)); ptrIdx++) {
ptr = ((uintptr_t *)vphysaddr)[ptrIdx];
+#if defined(HAS_APPLE_PAC)
+ // strip possible ptrauth signature from candidate data pointer
+ ptr = (uintptr_t)ptrauth_strip((void*)ptr, ptrauth_key_process_independent_data);
+#endif /* defined(HAS_APPLE_PAC) */
for (lim = count, baseIdx = 0; lim; lim >>= 1) {
inst = instances[baseIdx + (lim >> 1)];
OSData * data;
if (result) {
- *result = 0;
+ *result = NULL;
}
- data = 0;
+ data = NULL;
ret = kIOReturnNotReady;
#if IOTRACKING
inst = new IOKitDiagnosticsClient;
if (inst && !inst->init()) {
inst->release();
- inst = 0;
+ inst = NULL;
}
return inst;
return kIOReturnBadArgument;
}
- names = 0;
+ names = NULL;
namesLen = args->structureInputSize - sizeof(IOKitDiagnosticsParameters);
if (namesLen) {
names = (typeof(names))(params + 1);