summaryrefslogtreecommitdiffstats
path: root/lib/libc/net/res_mkquery.c
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1996-01-07 09:15:02 +0000
committerpeter <peter@FreeBSD.org>1996-01-07 09:15:02 +0000
commit5318dd95b77bde12017e70a09ed69461782dd072 (patch)
tree1516b0fb0f245a17a5452a1c556a957ffc9c7471 /lib/libc/net/res_mkquery.c
parent0dfd8e01c702cc5b7375837a5c4c2dcfb510540b (diff)
downloadFreeBSD-src-5318dd95b77bde12017e70a09ed69461782dd072.zip
FreeBSD-src-5318dd95b77bde12017e70a09ed69461782dd072.tar.gz
Merge the 4.9.3-rel code into the res_* parts. The gethostXXXbyYYY
parts are not quite so simple..
Diffstat (limited to 'lib/libc/net/res_mkquery.c')
-rw-r--r--lib/libc/net/res_mkquery.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/lib/libc/net/res_mkquery.c b/lib/libc/net/res_mkquery.c
index 61d5825e..75a9a5a 100644
--- a/lib/libc/net/res_mkquery.c
+++ b/lib/libc/net/res_mkquery.c
@@ -53,7 +53,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
static char sccsid[] = "@(#)res_mkquery.c 8.1 (Berkeley) 6/4/93";
-static char rcsid[] = "$Id: res_mkquery.c,v 1.5 1995/08/20 20:02:56 peter Exp $";
+static char rcsid[] = "$Id: res_mkquery.c,v 1.6 1995/08/21 09:15:37 bde Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/param.h>
@@ -61,9 +61,9 @@ static char rcsid[] = "$Id: res_mkquery.c,v 1.5 1995/08/20 20:02:56 peter Exp $"
#include <arpa/nameser.h>
#include <stdio.h>
+#include <netdb.h>
#include <resolv.h>
#include <string.h>
-#include <netdb.h>
#include "res_config.h"
@@ -103,7 +103,7 @@ res_mkquery(op, dname, class, type, data, datalen, newrr_in, buf, buflen)
* Initialize header fields.
*/
if ((buf == NULL) || (buflen < HFIXEDSZ))
- return(-1);
+ return (-1);
bzero(buf, HFIXEDSZ);
hp = (HEADER *) buf;
hp->id = htons(++_res.id);
@@ -123,7 +123,7 @@ res_mkquery(op, dname, class, type, data, datalen, newrr_in, buf, buflen)
case QUERY: /*FALLTHROUGH*/
case NS_NOTIFY_OP:
if ((buflen -= QFIXEDSZ) < 0)
- return(-1);
+ return (-1);
if ((n = dn_comp(dname, cp, buflen, dnptrs, lastdnptr)) < 0)
return (-1);
cp += n;
@@ -197,13 +197,13 @@ res_mkquery(op, dname, class, type, data, datalen, newrr_in, buf, buflen)
return (-1);
cp += n;
__putshort(type, cp);
- cp += INT16SZ;
- __putshort(class, cp);
- cp += INT16SZ;
+ cp += INT16SZ;
+ __putshort(class, cp);
+ cp += INT16SZ;
__putlong(0, cp);
cp += INT32SZ;
__putshort(datalen, cp);
- cp += INT16SZ;
+ cp += INT16SZ;
if (datalen) {
bcopy(data, cp, datalen);
cp += datalen;
@@ -220,13 +220,13 @@ res_mkquery(op, dname, class, type, data, datalen, newrr_in, buf, buflen)
return (-1);
cp += n;
__putshort(newrr->r_type, cp);
- cp += INT16SZ;
- __putshort(newrr->r_class, cp);
- cp += INT16SZ;
+ cp += INT16SZ;
+ __putshort(newrr->r_class, cp);
+ cp += INT16SZ;
__putlong(0, cp);
cp += INT32SZ;
__putshort(newrr->r_size, cp);
- cp += INT16SZ;
+ cp += INT16SZ;
if (newrr->r_size) {
bcopy(newrr->r_data, cp, newrr->r_size);
cp += newrr->r_size;
OpenPOWER on IntegriCloud