X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fbin%2Flttng%2Fcommands%2Fcalibrate.c;h=dc95d246956739371fec8bf0f7853f8409c5a43a;hb=ae8564917fa3cb3497ec17951d8ac0ee28de9c81;hp=a60cadfa042a629eee9d97f1c4c1615a889e6656;hpb=1c8d13c8a4111fcfd4cc00c335d47506ab98bb33;p=lttng-tools.git diff --git a/src/bin/lttng/commands/calibrate.c b/src/bin/lttng/commands/calibrate.c index a60cadfa0..dc95d2469 100644 --- a/src/bin/lttng/commands/calibrate.c +++ b/src/bin/lttng/commands/calibrate.c @@ -156,7 +156,6 @@ static int calibrate_lttng(void) calibrate.type = LTTNG_CALIBRATE_FUNCTION; ret = lttng_calibrate(handle, &calibrate); if (ret < 0) { - ret = CMD_ERROR; goto error; } MSG("%s calibration done", opt_kernel ? "Kernel" : "UST"); @@ -187,7 +186,7 @@ error: */ int cmd_calibrate(int argc, const char **argv) { - int opt, ret; + int opt, ret = CMD_SUCCESS; static poptContext pc; pc = poptGetContext(NULL, argc, argv, long_options, 0); @@ -200,7 +199,6 @@ int cmd_calibrate(int argc, const char **argv) switch (opt) { case OPT_HELP: usage(stdout); - ret = CMD_SUCCESS; goto end; case OPT_TRACEPOINT: ret = CMD_UNDEFINED; @@ -225,7 +223,6 @@ int cmd_calibrate(int argc, const char **argv) break; case OPT_LIST_OPTIONS: list_cmd_options(stdout, long_options); - ret = CMD_SUCCESS; goto end; default: usage(stderr); @@ -237,5 +234,6 @@ int cmd_calibrate(int argc, const char **argv) ret = calibrate_lttng(); end: + poptFreeContext(pc); return ret; }