Remove some variables that are no longer used as of r271413.
Reported by: Coverity CID: 1238924 X-MFC-With: r271413
This commit is contained in:
parent
166a4e4701
commit
f0de463732
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=272002
@ -121,12 +121,12 @@ dtrace_dof_init(void)
|
|||||||
#if !defined(sun)
|
#if !defined(sun)
|
||||||
Elf *e;
|
Elf *e;
|
||||||
Elf_Scn *scn = NULL;
|
Elf_Scn *scn = NULL;
|
||||||
Elf_Data *symtabdata = NULL, *dynsymdata = NULL, *dofdata = NULL;
|
Elf_Data *dofdata = NULL;
|
||||||
dof_hdr_t *dof_next = NULL;
|
dof_hdr_t *dof_next = NULL;
|
||||||
GElf_Shdr shdr;
|
GElf_Shdr shdr;
|
||||||
int efd;
|
int efd;
|
||||||
char *s;
|
char *s;
|
||||||
size_t shstridx, symtabidx = 0, dynsymidx = 0;
|
size_t shstridx;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (getenv("DTRACE_DOF_INIT_DISABLE") != NULL)
|
if (getenv("DTRACE_DOF_INIT_DISABLE") != NULL)
|
||||||
@ -166,15 +166,9 @@ dtrace_dof_init(void)
|
|||||||
dof = NULL;
|
dof = NULL;
|
||||||
while ((scn = elf_nextscn(e, scn)) != NULL) {
|
while ((scn = elf_nextscn(e, scn)) != NULL) {
|
||||||
gelf_getshdr(scn, &shdr);
|
gelf_getshdr(scn, &shdr);
|
||||||
if (shdr.sh_type == SHT_SYMTAB) {
|
if (shdr.sh_type == SHT_SUNW_dof) {
|
||||||
symtabidx = shdr.sh_link;
|
|
||||||
symtabdata = elf_getdata(scn, NULL);
|
|
||||||
} else if (shdr.sh_type == SHT_DYNSYM) {
|
|
||||||
dynsymidx = shdr.sh_link;
|
|
||||||
dynsymdata = elf_getdata(scn, NULL);
|
|
||||||
} else if (shdr.sh_type == SHT_SUNW_dof) {
|
|
||||||
s = elf_strptr(e, shstridx, shdr.sh_name);
|
s = elf_strptr(e, shstridx, shdr.sh_name);
|
||||||
if (s != NULL && strcmp(s, ".SUNW_dof") == 0) {
|
if (s != NULL && strcmp(s, ".SUNW_dof") == 0) {
|
||||||
dofdata = elf_getdata(scn, NULL);
|
dofdata = elf_getdata(scn, NULL);
|
||||||
dof = dofdata->d_buf;
|
dof = dofdata->d_buf;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user