From 95500a936a1b0e42d304315fd2f7ae20ca391042 Mon Sep 17 00:00:00 2001 From: Omar Polo Date: Fri, 11 Aug 2023 10:38:34 +0000 Subject: remove not so useful starts_with() replace its only usage with strncmp(). it's likely faster too. --- puny.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'puny.c') diff --git a/puny.c b/puny.c index 7c3c92e..e6ea438 100644 --- a/puny.c +++ b/puny.c @@ -151,7 +151,7 @@ decode(const char *str, char *out, size_t len, const char **err) unsigned int numpoints; const char *s; - if (!starts_with(str, "xn--")) { + if (strncmp(str, "xn--", 4) != 0) { strncpy(out, str, len); return 1; } -- cgit v1.2.3