diff options
author | roland <roland> | 2005-11-03 21:56:08 +0000 |
---|---|---|
committer | roland <roland> | 2005-11-03 21:56:08 +0000 |
commit | 31180a00d6f6ed5b6a155ebfdb4d5d8330969d89 (patch) | |
tree | 45ae3bb9a05ca57c6c469493eb07e0ff7799ea24 /tapsets.cxx | |
parent | 703621ae2cb0bec9cc12786f33381dbb890b9251 (diff) | |
download | systemtap-steved-31180a00d6f6ed5b6a155ebfdb4d5d8330969d89.tar.gz systemtap-steved-31180a00d6f6ed5b6a155ebfdb4d5d8330969d89.tar.xz systemtap-steved-31180a00d6f6ed5b6a155ebfdb4d5d8330969d89.zip |
2005-11-03 Roland McGrath <roland@redhat.com>
* tapsets.cxx (add_probe_point): Use explicit test with assignment in
while condition.
Diffstat (limited to 'tapsets.cxx')
-rw-r--r-- | tapsets.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
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) |