From 31180a00d6f6ed5b6a155ebfdb4d5d8330969d89 Mon Sep 17 00:00:00 2001 From: roland Date: Thu, 3 Nov 2005 21:56:08 +0000 Subject: 2005-11-03 Roland McGrath * tapsets.cxx (add_probe_point): Use explicit test with assignment in while condition. --- tapsets.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tapsets.cxx') diff --git a/tapsets.cxx b/tapsets.cxx index ede2092f..0fedafa0 100644 --- a/tapsets.cxx +++ b/tapsets.cxx @@ -1658,7 +1658,7 @@ dwarf_query::add_probe_point(string const & funcname, Elf_Scn* scn = 0; size_t shstrndx; dw.dwfl_assert ("getshstrndx", elf_getshstrndx (elf, &shstrndx)); - while (scn = elf_nextscn (elf, scn)) + while ((scn = elf_nextscn (elf, scn)) != NULL) { GElf_Shdr shdr_mem; GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem); @@ -1669,7 +1669,7 @@ dwarf_query::add_probe_point(string const & funcname, GElf_Addr end = start + shdr->sh_size; if (! (rel_addr >= start && rel_addr < end)) continue; - + // check for section name const char* name = elf_strptr (elf, shstrndx, shdr->sh_name); if (name && strncmp (name, ".init.", 6) == 0) -- cgit