clang-tidy: apply suggested fixes
[lttng-tools.git] / src / common / argpar-utils / argpar-utils.cpp
index 7c8934778a5b478ac1252d937a61f44151e577ea..27e08c7ee4f62faf5ee4cf960147e60a2c414972 100644 (file)
@@ -74,7 +74,7 @@ static ATTR_FORMAT_PRINTF(4, 0) char *format_arg_error_v(const struct argpar_err
        {
                bool is_short;
                const struct argpar_opt_descr *descr = argpar_error_opt_descr(error, &is_short);
-               int orig_index = argpar_error_orig_index(error);
+               const int orig_index = argpar_error_orig_index(error);
                const char *arg = argv[orig_index];
 
                if (is_short) {
@@ -101,7 +101,7 @@ static ATTR_FORMAT_PRINTF(4, 0) char *format_arg_error_v(const struct argpar_err
        }
        case ARGPAR_ERROR_TYPE_UNKNOWN_OPT:
        {
-               int orig_index = argpar_error_orig_index(error);
+               const int orig_index = argpar_error_orig_index(error);
                const char *unknown_opt = argpar_error_unknown_opt_name(error);
 
                ret = strutils_appendf(&str,
This page took 0.024163 seconds and 4 git commands to generate.