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");
*/
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);
switch (opt) {
case OPT_HELP:
usage(stdout);
- ret = CMD_SUCCESS;
goto end;
case OPT_TRACEPOINT:
ret = CMD_UNDEFINED;
break;
case OPT_LIST_OPTIONS:
list_cmd_options(stdout, long_options);
- ret = CMD_SUCCESS;
goto end;
default:
usage(stderr);
ret = calibrate_lttng();
end:
+ poptFreeContext(pc);
return ret;
}