]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
backtrace: Avoid potential spurious output.
authorAlexander Traud <pabstraud@compuserve.com>
Tue, 30 Jan 2018 15:58:30 +0000 (16:58 +0100)
committerAlexander Traud <pabstraud@compuserve.com>
Sat, 10 Feb 2018 13:56:28 +0000 (07:56 -0600)
clang 4.0 found this via -Wlogical-not-parentheses.

ASTERISK-27642

Change-Id: I9ec3e144d425a976c02811bd23cd0c533d2eca4e

main/backtrace.c

index 16598905480d98a4958610f86e84e080d3452c18..cb1a87049b5697d34af21d355f3435a8c0ad70bc 100644 (file)
@@ -131,7 +131,7 @@ char **__ast_bt_get_symbols(void **addresses, size_t num_frames)
                        }
 
                        for (section = bfdobj->sections; section; section = section->next) {
-                               if (!bfd_get_section_flags(bfdobj, section) & SEC_ALLOC ||
+                               if (!(bfd_get_section_flags(bfdobj, section) & SEC_ALLOC) ||
                                        section->vma > offset ||
                                        section->size + section->vma < offset) {
                                        continue;