File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -202,31 +202,25 @@ do \
202202#define KHR_ICD_VALIDATE_HANDLE_RETURN_ERROR (handle ,invalid_handle_error_code ) \
203203do \
204204{ \
205- if (khrEnableTrace ) \
205+ if (!handle ) \
206206 { \
207- if (!handle) \
208- { \
209- return invalid_handle_error_code; \
210- } \
211- }\
207+ return invalid_handle_error_code; \
208+ } \
212209} while (0)
213210
214211// if handle is NULL then set errcode_ret to invalid_handle_error and return NULL
215212// (NULL being an invalid handle)
216213#define KHR_ICD_VALIDATE_HANDLE_RETURN_HANDLE (handle ,invalid_handle_error ) \
217214do \
218215{ \
219- if (khrEnableTrace ) \
216+ if (!handle ) \
220217 { \
221- if (!handle ) \
218+ if (errcode_ret ) \
222219 { \
223- if (errcode_ret) \
224- { \
225- *errcode_ret = invalid_handle_error; \
226- } \
227- return NULL; \
220+ *errcode_ret = invalid_handle_error; \
228221 } \
229- }\
222+ return NULL; \
223+ } \
230224} while (0)
231225
232226#endif
You can’t perform that action at this time.
0 commit comments