if (cp + 2 * INT16SZ > eom) return (-1);
res_nameinquery(name, type, class, buf, eom)	const char *name;	register int type, class;	const u_char *buf, *eom;{	register const u_char *cp = buf + HFIXEDSZ;	int qdcount = ntohs(((HEADER*)buf)->qdcount);	while (qdcount-- > 0) {		char tname[MAXDNAME+1];		register int n, ttype, tclass;		n = dn_expand(buf, eom, cp, tname, sizeof tname);		if (n < 0)			return (-1);		cp += n;		ttype = _getshort(cp); cp += INT16SZ;		tclass = _getshort(cp); cp += INT16SZ;		if (ttype == type &&		    tclass == class &&		    strcasecmp(tname, name) == 0)			return (1);	}	return (0);}