Fix: bad logical check of error codes
[lttng-tools.git] / src / bin / lttng-sessiond / ust-app.c
index 73c6d6a0fbab4387668d4aad18f77b964d7c69c3..ab08ac0e4d04ccf409c8d02e358e11f0033a0520 100644 (file)
@@ -406,7 +406,8 @@ void delete_ust_app_channel(int sock, struct ust_app_channel *ua_chan,
        if (ua_chan->obj != NULL) {
                /* Remove channel from application UST object descriptor. */
                iter.iter.node = &ua_chan->ust_objd_node.node;
-               lttng_ht_del(app->ust_objd, &iter);
+               ret = lttng_ht_del(app->ust_objd, &iter);
+               assert(!ret);
                ret = ustctl_release_object(sock, ua_chan->obj);
                if (ret < 0 && ret != -EPIPE && ret != -LTTNG_UST_ERR_EXITING) {
                        ERR("UST app sock %d release channel obj failed with ret %d",
@@ -3147,7 +3148,7 @@ int ust_app_list_events(struct lttng_event **events)
                        /* Handle ustctl error. */
                        if (ret < 0) {
                                free(tmp_event);
-                               if (ret != -LTTNG_UST_ERR_EXITING || ret != -EPIPE) {
+                               if (ret != -LTTNG_UST_ERR_EXITING && ret != -EPIPE) {
                                        ERR("UST app tp list get failed for app %d with ret %d",
                                                        app->sock, ret);
                                } else {
@@ -3247,7 +3248,7 @@ int ust_app_list_event_fields(struct lttng_event_field **fields)
                        /* Handle ustctl error. */
                        if (ret < 0) {
                                free(tmp_event);
-                               if (ret != -LTTNG_UST_ERR_EXITING || ret != -EPIPE) {
+                               if (ret != -LTTNG_UST_ERR_EXITING && ret != -EPIPE) {
                                        ERR("UST app tp list field failed for app %d with ret %d",
                                                        app->sock, ret);
                                } else {
This page took 0.025817 seconds and 5 git commands to generate.