From: Jérémie Galarneau Date: Tue, 3 Apr 2018 14:13:26 +0000 (-0400) Subject: Fix: cmd_rotate_set_schedule returns positive error codes X-Git-Tag: v2.11.0-rc1~312 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=a2026546ba7e757714fd2f5bbf5b956827444dd6;p=lttng-tools.git Fix: cmd_rotate_set_schedule returns positive error codes Signed-off-by: Jérémie Galarneau --- diff --git a/src/bin/lttng-sessiond/main.c b/src/bin/lttng-sessiond/main.c index 4c885d7b7..db92191c8 100644 --- a/src/bin/lttng-sessiond/main.c +++ b/src/bin/lttng-sessiond/main.c @@ -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: diff --git a/src/lib/lttng-ctl/rotate.c b/src/lib/lttng-ctl/rotate.c index d9907cc67..4b7c2f916 100644 --- a/src/lib/lttng-ctl/rotate.c +++ b/src/lib/lttng-ctl/rotate.c @@ -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; }