* just created it.
*/
switch (ret) {
- case -EPERM:
+ case -LTTNG_UST_ERR_PERM:
/* Code flow problem */
assert(0);
- case -EEXIST:
+ case -LTTNG_UST_ERR_EXIST:
/* It's OK for our use case. */
ret = 0;
break;
ret = create_ust_channel(app, ua_sess, ua_chan);
if (ret < 0) {
/* Not found previously means that it does not exist on the tracer */
- assert(ret != -EEXIST);
+ assert(ret != -LTTNG_UST_ERR_EXIST);
goto error;
}
ret = create_ust_event(app, ua_sess, ua_chan, ua_event);
if (ret < 0) {
/* Not found previously means that it does not exist on the tracer */
- assert(ret != -EEXIST);
+ assert(ret == -LTTNG_UST_ERR_EXIST);
goto error;
}
ret = create_ust_app_event(ua_sess, ua_chan, uevent, app);
if (ret < 0) {
- if (ret != -EEXIST) {
+ if (ret != -LTTNG_UST_ERR_EXIST) {
/* Possible value at this point: -ENOMEM. If so, we stop! */
break;
}