Fix: cmd_rotate_set_schedule returns positive error codes
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 3 Apr 2018 14:13:26 +0000 (10:13 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 3 Apr 2018 16:12:29 +0000 (12:12 -0400)
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/bin/lttng-sessiond/main.c
src/lib/lttng-ctl/rotate.c

index 4c885d7b74f63f2c51447932fe36afccabb81d8e..db92191c8c31a9e77e4c2c48d002ecbbcd7e0369 100644 (file)
@@ -4204,12 +4204,10 @@ error_add_context:
                                cmd_ctx->lsm->u.rotate_setup.timer_us,
                                cmd_ctx->lsm->u.rotate_setup.size,
                                notification_thread_handle);
-               if (ret < 0) {
-                       ret = -ret;
+               if (ret != LTTNG_OK) {
                        goto error;
                }
 
-               ret = LTTNG_OK;
                break;
        }
        case LTTNG_ROTATION_SCHEDULE_GET_TIMER_PERIOD:
index d9907cc67e34b3c33304f989b69d920c81cb1c03..4b7c2f9162c69ba18e837dbcfbdab72404bf9411 100644 (file)
@@ -332,7 +332,6 @@ int lttng_rotation_set_schedule(
        lsm.u.rotate_setup.size = attr->size;
 
        ret = lttng_ctl_ask_sessiond(&lsm, NULL);
-
 end:
        return ret;
 }
This page took 0.028076 seconds and 4 git commands to generate.