loongarch64: add new syscall numbers
[musl.git] / src / network / dn_skipname.c
blobeba65bb82ad277a15662084e570c6fd6046b0f1f
1 #include <resolv.h>
3 int dn_skipname(const unsigned char *s, const unsigned char *end)
5 const unsigned char *p = s;
6 while (p < end)
7 if (!*p) return p-s+1;
8 else if (*p>=192)
9 if (p+1<end) return p-s+2;
10 else break;
11 else
12 if (end-p<*p+1) break;
13 else p += *p + 1;
14 return -1;