st/oxr: Fix 32-bit warnings when checking for null handles

This commit is contained in:
Ryan Pavlik 2020-04-28 17:47:12 -05:00
parent d95219810e
commit e89a3c1d8f
2 changed files with 3 additions and 3 deletions

View file

@ -290,7 +290,7 @@ oxr_xrGetInstanceProcAddr(XrInstance instance,
// We need to set this unconditionally, per the spec.
*function = NULL;
if ((void *)instance == NULL) {
if (instance == XR_NULL_HANDLE) {
oxr_log_init(&log, "xrGetInstanceProcAddr");
return handle_null(&log, name, function);
}

View file

@ -18,7 +18,7 @@ extern "C" {
lookup) \
do { \
oxr_log_init(log, name); \
if ((void *)thing == NULL) { \
if (thing == XR_NULL_HANDLE) { \
return oxr_error(log, XR_ERROR_HANDLE_INVALID, \
"(" #thing " == NULL)"); \
} \
@ -40,7 +40,7 @@ extern "C" {
#define _OXR_VERIFY_SET(log, arg, new_arg, THING) \
do { \
if ((void *)arg == NULL) { \
if (arg == XR_NULL_HANDLE) { \
return oxr_error(log, XR_ERROR_HANDLE_INVALID, \
"(" #arg " == NULL)"); \
} \