char *owner_uid = NULL;
long long uid;
struct mi_writer *mi_writer = NULL;
+ const char **args;
if (lttng_opt_mi) {
mi_writer = mi_lttng_writer_create(
}
}
- 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;
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, NULL, NULL);
if (status == PARSE_NEXT_ITEM_STATUS_ERROR ||
status == PARSE_NEXT_ITEM_STATUS_ERROR_MEMORY) {
goto error;