aboutsummaryrefslogtreecommitdiff
path: root/gcc/objc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/objc')
-rw-r--r--gcc/objc/objc-act.c2
-rw-r--r--gcc/objc/objc-encoding.c2
-rw-r--r--gcc/objc/objc-next-runtime-abi-02.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/gcc/objc/objc-act.c b/gcc/objc/objc-act.c
index 1cbd586..796256d 100644
--- a/gcc/objc/objc-act.c
+++ b/gcc/objc/objc-act.c
@@ -10275,7 +10275,7 @@ objc_string_ref_type_p (tree strp)
return (tmv
&& TREE_CODE (tmv) == IDENTIFIER_NODE
&& IDENTIFIER_POINTER (tmv)
- && !strncmp (IDENTIFIER_POINTER (tmv), "NSString", 8));
+ && startswith (IDENTIFIER_POINTER (tmv), "NSString"));
}
/* At present the behavior of this is undefined and it does nothing. */
diff --git a/gcc/objc/objc-encoding.c b/gcc/objc/objc-encoding.c
index c4067b1..7ad920a 100644
--- a/gcc/objc/objc-encoding.c
+++ b/gcc/objc/objc-encoding.c
@@ -733,7 +733,7 @@ encode_type (tree type, int curtype, int format)
char *enc = (char *) obstack_base (&util_obstack) + curtype;
/* Rewrite "in const" from "nr" to "rn". */
- if (curtype >= 1 && !strncmp (enc - 1, "nr", 2))
+ if (curtype >= 1 && startswith (enc - 1, "nr"))
memcpy (enc - 1, "rn", 2);
}
}
diff --git a/gcc/objc/objc-next-runtime-abi-02.c b/gcc/objc/objc-next-runtime-abi-02.c
index af68c1c..3cfcd0b 100644
--- a/gcc/objc/objc-next-runtime-abi-02.c
+++ b/gcc/objc/objc-next-runtime-abi-02.c
@@ -2209,7 +2209,7 @@ has_load_impl (tree clsmeth)
{
tree id = METHOD_SEL_NAME (clsmeth);
if (IDENTIFIER_LENGTH (id) == 4
- && strncmp (IDENTIFIER_POINTER (id), "load", 4) == 0)
+ && startswith (IDENTIFIER_POINTER (id), "load"))
return true;
clsmeth = DECL_CHAIN (clsmeth);
}