diff --git a/src/linux/addr2line.h b/src/linux/addr2line.h index bd08ced2..8d3c5907 100644 --- a/src/linux/addr2line.h +++ b/src/linux/addr2line.h @@ -206,7 +206,6 @@ get_native_frame(const char *file_name, bfd_vma addr, key_dt frame_key) bfd_map_over_sections(abfd, find_address_in_section, NULL); const char *name; - char *alloc = NULL; name = functionname; if (name == NULL || *name == '\0') @@ -214,7 +213,7 @@ get_native_frame(const char *file_name, bfd_vma addr, key_dt frame_key) #ifdef HAVE_LIBERTY else { - alloc = bfd_demangle(abfd, name, DMGL_PARAMS | DMGL_ANSI); + char *alloc = bfd_demangle(abfd, name, DMGL_PARAMS | DMGL_ANSI); if (alloc != NULL) name = alloc; } diff --git a/src/py_proc_list.c b/src/py_proc_list.c index f5643311..7fc682a7 100644 --- a/src/py_proc_list.c +++ b/src/py_proc_list.c @@ -219,7 +219,7 @@ py_proc_list__update(py_proc_list_t * self) { for (;;) { // This code is inspired by the ps util ent = readdir(proc_dir); - if (!ent || !ent->d_name) break; + if (!ent) break; if ((*ent->d_name <= '0') || (*ent->d_name > '9')) continue; unsigned long pid = strtoul(ent->d_name, NULL, 10);