From 08228b11557016f6f12d537ebff5f169fdf9bc6c Mon Sep 17 00:00:00 2001 From: Eric Christopher Date: Wed, 8 Nov 2017 14:03:55 -0800 Subject: Apply: 2017-11-08 Kyle Butt * object.cc (do_find_special_sections): Fix a thinko with memmem return values and check for != NULL rather than == 0. --- gold/object.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gold/object.cc') diff --git a/gold/object.cc b/gold/object.cc index 4110686..0135651 100644 --- a/gold/object.cc +++ b/gold/object.cc @@ -816,9 +816,9 @@ Sized_relobj_file::do_find_special_sections( return (this->has_eh_frame_ || (!parameters->options().relocatable() && parameters->options().gdb_index() - && (memmem(names, sd->section_names_size, "debug_info", 11) == 0 + && (memmem(names, sd->section_names_size, "debug_info", 11) != NULL || memmem(names, sd->section_names_size, - "debug_types", 12) == 0))); + "debug_types", 12) != NULL))); } // Read the sections and symbols from an object file. -- cgit v1.1