projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: documented number of subbuffers is incorrect
[lttng-tools.git]
/
src
/
bin
/
lttng
/
commands
/
calibrate.c
diff --git
a/src/bin/lttng/commands/calibrate.c
b/src/bin/lttng/commands/calibrate.c
index a60cadfa042a629eee9d97f1c4c1615a889e6656..61b588e1294eead110e14bb5e043f0d74318b065 100644
(file)
--- a/
src/bin/lttng/commands/calibrate.c
+++ b/
src/bin/lttng/commands/calibrate.c
@@
-127,6
+127,9
@@
static int calibrate_lttng(void)
struct lttng_domain dom;
struct lttng_calibrate calibrate;
struct lttng_domain dom;
struct lttng_calibrate calibrate;
+ memset(&dom, 0, sizeof(dom));
+ memset(&calibrate, 0, sizeof(calibrate));
+
/* Create lttng domain */
if (opt_kernel) {
dom.type = LTTNG_DOMAIN_KERNEL;
/* Create lttng domain */
if (opt_kernel) {
dom.type = LTTNG_DOMAIN_KERNEL;
@@
-156,7
+159,6
@@
static int calibrate_lttng(void)
calibrate.type = LTTNG_CALIBRATE_FUNCTION;
ret = lttng_calibrate(handle, &calibrate);
if (ret < 0) {
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");
goto error;
}
MSG("%s calibration done", opt_kernel ? "Kernel" : "UST");
@@
-187,7
+189,7
@@
error:
*/
int cmd_calibrate(int argc, const char **argv)
{
*/
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);
static poptContext pc;
pc = poptGetContext(NULL, argc, argv, long_options, 0);
@@
-200,7
+202,6
@@
int cmd_calibrate(int argc, const char **argv)
switch (opt) {
case OPT_HELP:
usage(stdout);
switch (opt) {
case OPT_HELP:
usage(stdout);
- ret = CMD_SUCCESS;
goto end;
case OPT_TRACEPOINT:
ret = CMD_UNDEFINED;
goto end;
case OPT_TRACEPOINT:
ret = CMD_UNDEFINED;
@@
-225,7
+226,6
@@
int cmd_calibrate(int argc, const char **argv)
break;
case OPT_LIST_OPTIONS:
list_cmd_options(stdout, long_options);
break;
case OPT_LIST_OPTIONS:
list_cmd_options(stdout, long_options);
- ret = CMD_SUCCESS;
goto end;
default:
usage(stderr);
goto end;
default:
usage(stderr);
@@
-237,5
+237,6
@@
int cmd_calibrate(int argc, const char **argv)
ret = calibrate_lttng();
end:
ret = calibrate_lttng();
end:
+ poptFreeContext(pc);
return ret;
}
return ret;
}
This page took
0.024018 seconds
and
4
git commands to generate.