(__res_nopt): Use NS_PUT16 instead of ns_put16.
authordrepper <drepper>
Sun, 20 Apr 2008 04:56:37 +0000 (04:56 +0000)
committerdrepper <drepper>
Sun, 20 Apr 2008 04:56:37 +0000 (04:56 +0000)
resolv/res_mkquery.c

index 3fa597f..416bf1c 100644 (file)
@@ -238,17 +238,13 @@ __res_nopt(res_state statp,
 
        *cp++ = 0;      /* "." */
 
-       ns_put16(T_OPT, cp);    /* TYPE */
-       cp += INT16SZ;
-       ns_put16(anslen & 0xffff, cp);  /* CLASS = UDP payload size */
-       cp += INT16SZ;
+       NS_PUT16(T_OPT, cp);    /* TYPE */
+       NS_PUT16(anslen & 0xffff, cp);  /* CLASS = UDP payload size */
        *cp++ = NOERROR;        /* extended RCODE */
        *cp++ = 0;              /* EDNS version */
        /* XXX Once we support DNSSEC we change the flag value here.  */
-       ns_put16(flags, cp);
-       cp += INT16SZ;
-       ns_put16(0, cp);        /* RDLEN */
-       cp += INT16SZ;
+       NS_PUT16(flags, cp);
+       NS_PUT16(0, cp);        /* RDLEN */
        hp->arcount = htons(ntohs(hp->arcount) + 1);
 
        return cp - buf;