From: Iain Buclaw Date: Tue, 18 May 2021 20:56:10 +0000 (+0200) Subject: d: Use startswith function instead of strncmp X-Git-Tag: upstream/12.2.0~7808 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f87ce01441881cbb3093e3ddace875c0ed23e595;p=platform%2Fupstream%2Fgcc.git d: Use startswith function instead of strncmp gcc/d/ChangeLog: * types.cc (TypeVisitor::visit (TypeEnum *)): Use startswith function instead of strncmp. --- diff --git a/gcc/d/types.cc b/gcc/d/types.cc index 3b121f5..ba2d6d4 100644 --- a/gcc/d/types.cc +++ b/gcc/d/types.cc @@ -874,7 +874,7 @@ public: Type *underlying = NULL; /* Skip over the prefixing `__c_'. */ - gcc_assert (strncmp (ident, "__c_", strlen ("__c_")) == 0); + gcc_assert (startswith (ident, "__c_")); ident = ident + strlen ("__c_"); /* To keep things compatible within the code generation we stick to