From: Ian Lance Taylor Date: Wed, 19 May 2021 03:07:29 +0000 (-0700) Subject: gofrontend: revert startswith change X-Git-Tag: basepoints/gcc-13~7413 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2ebddf2ec55a77d6bd5aaad0f753a173054787a7;p=thirdparty%2Fgcc.git gofrontend: revert startswith change This file is copied from a different repo and should not be changed directly in the GCC repo. --- diff --git a/gcc/go/gofrontend/runtime.cc b/gcc/go/gofrontend/runtime.cc index 514c045a68fa..3cc5ded36176 100644 --- a/gcc/go/gofrontend/runtime.cc +++ b/gcc/go/gofrontend/runtime.cc @@ -463,7 +463,7 @@ Runtime::name_to_code(const std::string& name) // The names in the table have "runtime." prefix. We may be // called with a name without the prefix. Try matching // without the prefix as well. - if (startswith(runtime_function_name, "runtime.") + if (strncmp(runtime_function_name, "runtime.", 8) == 0 && strcmp(runtime_function_name + 8, name.c_str()) == 0) code = static_cast(i); }