aboutsummaryrefslogtreecommitdiff
path: root/puny.c
diff options
context:
space:
mode:
authorOmar Polo <op@omarpolo.com>2023-08-11 10:38:34 +0000
committerOmar Polo <op@omarpolo.com>2023-08-11 10:38:34 +0000
commit95500a936a1b0e42d304315fd2f7ae20ca391042 (patch)
tree449fac7d1b9f268b98c7bc3a0eda939dd7c67a4e /puny.c
parent8bb1b2363302a31c91ba921580d3227ccd3e878c (diff)
remove not so useful starts_with()
replace its only usage with strncmp(). it's likely faster too.
Diffstat (limited to 'puny.c')
-rw-r--r--puny.c2
1 files changed, 1 insertions, 1 deletions
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;
}