Fix: unused value in SDT probe description parsing
authorFrancis Deslauriers <francis.deslauriers@efficios.com>
Tue, 28 Aug 2018 21:09:48 +0000 (17:09 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 29 Aug 2018 21:32:45 +0000 (17:32 -0400)
Reported-by: Coverity (1395199) Unused value
Signed-off-by: Francis Deslauriers <francis.deslauriers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/common/lttng-elf.c

index 47dc89900237f4e88aa537ec8a8d6be548c95998..5d3aaad04bf098a5fc60f1407c5a2bad8f6e547d 100644 (file)
@@ -875,7 +875,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 +965,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 +981,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 &&
This page took 0.036802 seconds and 4 git commands to generate.