aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorIain Buclaw <ibuclaw@gdcproject.org>2021-05-18 22:56:10 +0200
committerIain Buclaw <ibuclaw@gdcproject.org>2021-05-18 23:01:30 +0200
commitf87ce01441881cbb3093e3ddace875c0ed23e595 (patch)
tree35bf09a7506ee928d4f4ecbf605e5b205b8d5337 /gcc
parent3e0ad85638b8b7085add06b4afd77cbbf3549631 (diff)
downloadgcc-f87ce01441881cbb3093e3ddace875c0ed23e595.zip
gcc-f87ce01441881cbb3093e3ddace875c0ed23e595.tar.gz
gcc-f87ce01441881cbb3093e3ddace875c0ed23e595.tar.bz2
d: Use startswith function instead of strncmp
gcc/d/ChangeLog: * types.cc (TypeVisitor::visit (TypeEnum *)): Use startswith function instead of strncmp.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/d/types.cc2
1 files changed, 1 insertions, 1 deletions
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