clang-tidy: apply suggested fixes
[lttng-tools.git] / src / common / lttng-elf.cpp
index be1db0250ac02bae4af5cba422c52c3cb41a8132..8094b49677ed117fcef8d1f00f0b22faaeede7e7 100644 (file)
@@ -610,7 +610,7 @@ static int lttng_elf_get_section_hdr_by_name(struct lttng_elf *elf,
 
        for (i = 0; i < elf->ehdr->e_shnum; ++i) {
                bool name_equal;
-               int ret = lttng_elf_get_section_hdr(elf, i, section_hdr);
+               const int ret = lttng_elf_get_section_hdr(elf, i, section_hdr);
 
                if (ret) {
                        break;
@@ -823,10 +823,10 @@ int lttng_elf_get_symbol_offset(int fd, char *symbol, uint64_t *offset)
 
                /* Get the symbol at the current index. */
                if (is_elf_32_bit(elf)) {
-                       Elf32_Sym tmp = ((Elf32_Sym *) symbol_table_data)[sym_idx];
+                       const Elf32_Sym tmp = ((Elf32_Sym *) symbol_table_data)[sym_idx];
                        copy_sym(tmp, curr_sym);
                } else {
-                       Elf64_Sym tmp = ((Elf64_Sym *) symbol_table_data)[sym_idx];
+                       const Elf64_Sym tmp = ((Elf64_Sym *) symbol_table_data)[sym_idx];
                        copy_sym(tmp, curr_sym);
                }
 
This page took 0.024981 seconds and 4 git commands to generate.