···1149114911501150 //! @todo instance initialization is difficult to replicate
1151115111521152- int ret;
11531153- ret = xrt_instance_create(NULL, &m_xinst);
11541154- if (ret < 0) {
11521152+ xrt_result_t xret;
11531153+ xret = xrt_instance_create(NULL, &m_xinst);
11541154+ if (xret != XRT_SUCCESS) {
11551155 ovrd_log("Failed to create instance\n");
11561156 return vr::VRInitError_Init_HmdNotFound;
11571157 }
1158115811591159- xrt_result_t xret;
11601159 xret = xrt_instance_create_system(m_xinst, &m_xsysd, NULL);
11611160 if (xret < 0) {
11621161 ovrd_log("Failed to create system devices\n");
+7-6
src/xrt/targets/cli/cli_cmd_calibrate.c
···2929static int
3030init(struct program *p)
3131{
3232+ xrt_result_t xret;
3233 int ret;
33343435 // Fist initialize the instance.
···4142 // Get the prober pointer.
4243 // In general, null probers are OK, but this module directly uses the
4344 // prober.
4444- ret = xrt_instance_get_prober(p->xi, &p->xp);
4545- if (ret != 0) {
4545+ xret = xrt_instance_get_prober(p->xi, &p->xp);
4646+ if (xret != XRT_SUCCESS) {
4647 fprintf(stderr, "Failed to get prober from instance.\n");
4747- return ret;
4848+ return -1;
4849 }
4950 if (p->xp == NULL) {
5051 fprintf(stderr, "Null prober returned - cannot proceed.\n");
···5253 }
53545455 // Need to prime the prober before listing devices.
5555- ret = xrt_prober_probe(p->xp);
5656- if (ret != 0) {
5656+ xret = xrt_prober_probe(p->xp);
5757+ if (xret != XRT_SUCCESS) {
5758 fprintf(stderr, "Failed to probe for devices.\n");
5858- return ret;
5959+ return -1;
5960 }
60616162 return 0;