From 1cbedd3ee0043ef7ce18d6dabe296583e6891d2d Mon Sep 17 00:00:00 2001 From: Peter Collingbourne Date: Thu, 19 May 2011 17:34:44 +0000 Subject: Use the portable memchr function instead of the BSD-only strnstr llvm-svn: 131646 --- lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp') diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp index 8e883d15eb2..966d28f263d 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp @@ -813,10 +813,10 @@ DWARFCompileUnit::Index // Also see if this is a "category" on our class. If so strip off the category name, // and add the class name without it to the basename table. - const char *first_paren = strnstr (name, "(", method_name - name); + const char *first_paren = (char *) memchr (name, '(', method_name - name); if (first_paren) { - const char *second_paren = strnstr (first_paren, ")", method_name - first_paren); + const char *second_paren = (char *) memchr (first_paren, ')', method_name - first_paren); if (second_paren) { std::string buffer (name, first_paren - name); -- cgit v1.2.3