projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: sessiond: crash enabling event rules that differ only by loglevel type
[lttng-tools.git]
/
src
/
bin
/
lttng
/
commands
/
remove_trigger.cpp
diff --git
a/src/bin/lttng/commands/remove_trigger.cpp
b/src/bin/lttng/commands/remove_trigger.cpp
index 53e71c87d94b0b09eca8ae3427996d049a849d6d..08d4873f08a4cb9b9b66611eaeb51331c773ea76 100644
(file)
--- a/
src/bin/lttng/commands/remove_trigger.cpp
+++ b/
src/bin/lttng/commands/remove_trigger.cpp
@@
-62,17
+62,18
@@
int cmd_remove_trigger(int argc, const char **argv)
{
enum lttng_error_code ret_code;
int ret;
{
enum lttng_error_code ret_code;
int ret;
- struct argpar_iter *argpar_iter =
NULL
;
- const struct argpar_item *argpar_item =
NULL
;
- const char *name =
NULL
;
+ struct argpar_iter *argpar_iter =
nullptr
;
+ const struct argpar_item *argpar_item =
nullptr
;
+ const char *name =
nullptr
;
int i;
int i;
- struct lttng_triggers *triggers =
NULL
;
+ struct lttng_triggers *triggers =
nullptr
;
unsigned int triggers_count;
enum lttng_trigger_status trigger_status;
unsigned int triggers_count;
enum lttng_trigger_status trigger_status;
- const struct lttng_trigger *trigger_to_remove =
NULL
;
- char *owner_uid =
NULL
;
+ const struct lttng_trigger *trigger_to_remove =
nullptr
;
+ char *owner_uid =
nullptr
;
long long uid;
long long uid;
- struct mi_writer *mi_writer = NULL;
+ struct mi_writer *mi_writer = nullptr;
+ const char **args;
if (lttng_opt_mi) {
mi_writer = mi_lttng_writer_create(fileno(stdout), lttng_opt_mi);
if (lttng_opt_mi) {
mi_writer = mi_lttng_writer_create(fileno(stdout), lttng_opt_mi);
@@
-97,10
+98,9
@@
int cmd_remove_trigger(int argc, const char **argv)
}
}
}
}
- argc--;
- argv++;
+ args = argv + 1;
- argpar_iter = argpar_iter_create(argc
, argv
, remove_trigger_options);
+ argpar_iter = argpar_iter_create(argc
- 1, args
, remove_trigger_options);
if (!argpar_iter) {
ERR("Failed to allocate an argpar iter.");
goto error;
if (!argpar_iter) {
ERR("Failed to allocate an argpar iter.");
goto error;
@@
-109,7
+109,8
@@
int cmd_remove_trigger(int argc, const char **argv)
while (true) {
enum parse_next_item_status status;
while (true) {
enum parse_next_item_status status;
- status = parse_next_item(argpar_iter, &argpar_item, 1, argv, true, NULL, NULL);
+ status =
+ parse_next_item(argpar_iter, &argpar_item, 1, args, true, nullptr, nullptr);
if (status == PARSE_NEXT_ITEM_STATUS_ERROR ||
status == PARSE_NEXT_ITEM_STATUS_ERROR_MEMORY) {
goto error;
if (status == PARSE_NEXT_ITEM_STATUS_ERROR ||
status == PARSE_NEXT_ITEM_STATUS_ERROR_MEMORY) {
goto error;
@@
-218,7
+219,7
@@
int cmd_remove_trigger(int argc, const char **argv)
}
if (lttng_opt_mi) {
}
if (lttng_opt_mi) {
- ret_code = lttng_trigger_mi_serialize(trigger_to_remove, mi_writer,
NULL
);
+ ret_code = lttng_trigger_mi_serialize(trigger_to_remove, mi_writer,
nullptr
);
if (ret_code != LTTNG_OK) {
goto error;
}
if (ret_code != LTTNG_OK) {
goto error;
}
This page took
0.023793 seconds
and
4
git commands to generate.