Cleanup: unused assignation of ELF parsing error
[lttng-tools.git] / src / common / lttng-elf.c
index 47dc89900237f4e88aa537ec8a8d6be548c95998..118fc75af283acb18cc6aad277892282cfac79e3 100644 (file)
@@ -331,7 +331,6 @@ struct lttng_elf_shdr *lttng_elf_get_section_hdr(struct lttng_elf *elf,
 
        ret = populate_section_header(elf, section_header, index);
        if (ret) {
-               ret = LTTNG_ERR_ELF_PARSING;
                DBG("Error populating section header.");
                goto error;
        }
@@ -875,7 +874,7 @@ int lttng_elf_get_sdt_probe_offsets(int fd, const char *provider_name,
        struct lttng_elf *elf = NULL;
        char *stap_note_section_data = NULL;
        char *curr_note_section_begin, *curr_data_ptr, *curr_probe, *curr_provider;
-       char *next_note_ptr, *curr_desc_beg;
+       char *next_note_ptr;
        uint32_t name_size, desc_size, note_type;
        uint64_t curr_probe_location, curr_probe_offset, curr_semaphore_location;
        uint64_t *probe_locs = NULL, *new_probe_locs = NULL;
@@ -965,9 +964,6 @@ int lttng_elf_get_sdt_probe_offsets(int fd, const char *provider_name,
 
                curr_data_ptr += name_size;
 
-               /* Get description field. */
-               curr_desc_beg = curr_data_ptr;
-
                /* Get probe location.  */
                curr_probe_location = *(uint64_t *) curr_data_ptr;
                curr_data_ptr += sizeof(uint64_t);
@@ -984,9 +980,6 @@ int lttng_elf_get_sdt_probe_offsets(int fd, const char *provider_name,
 
                /* Get probe name. */
                curr_probe = curr_data_ptr;
-               curr_data_ptr += strlen(curr_probe) + 1;
-
-               curr_data_ptr = curr_desc_beg + desc_size;
 
                /* Check if the provider and probe name match */
                if (strcmp(provider_name, curr_provider) == 0 &&
@@ -1000,7 +993,7 @@ int lttng_elf_get_sdt_probe_offsets(int fd, const char *provider_name,
                         */
                        if (curr_semaphore_location != 0) {
                                ret = LTTNG_ERR_SDT_PROBE_SEMAPHORE;
-                               goto end;
+                               goto realloc_error;
                        }
 
                        new_size = (++nb_match) * sizeof(uint64_t);
This page took 0.023552 seconds and 4 git commands to generate.