Deleted Added
full compact
res_mkquery.c (292250) res_mkquery.c (298120)
1/*
2 * Portions Copyright (C) 2004, 2005, 2008 Internet Systems Consortium, Inc. ("ISC")
3 * Portions Copyright (C) 1996, 1997, 1988, 1999, 2001, 2003 Internet Software Consortium.
4 *
5 * Permission to use, copy, modify, and/or distribute this software for any
6 * purpose with or without fee is hereby granted, provided that the above
7 * copyright notice and this permission notice appear in all copies.
8 *

--- 55 unchanged lines hidden (view full) ---

64 * SOFTWARE.
65 */
66
67#if defined(LIBC_SCCS) && !defined(lint)
68static const char sccsid[] = "@(#)res_mkquery.c 8.1 (Berkeley) 6/4/93";
69static const char rcsid[] = "$Id: res_mkquery.c,v 1.10 2008/12/11 09:59:00 marka Exp $";
70#endif /* LIBC_SCCS and not lint */
71#include <sys/cdefs.h>
1/*
2 * Portions Copyright (C) 2004, 2005, 2008 Internet Systems Consortium, Inc. ("ISC")
3 * Portions Copyright (C) 1996, 1997, 1988, 1999, 2001, 2003 Internet Software Consortium.
4 *
5 * Permission to use, copy, modify, and/or distribute this software for any
6 * purpose with or without fee is hereby granted, provided that the above
7 * copyright notice and this permission notice appear in all copies.
8 *

--- 55 unchanged lines hidden (view full) ---

64 * SOFTWARE.
65 */
66
67#if defined(LIBC_SCCS) && !defined(lint)
68static const char sccsid[] = "@(#)res_mkquery.c 8.1 (Berkeley) 6/4/93";
69static const char rcsid[] = "$Id: res_mkquery.c,v 1.10 2008/12/11 09:59:00 marka Exp $";
70#endif /* LIBC_SCCS and not lint */
71#include <sys/cdefs.h>
72__FBSDID("$FreeBSD: head/lib/libc/resolv/res_mkquery.c 292250 2015-12-15 05:37:09Z ngie $");
72__FBSDID("$FreeBSD: head/lib/libc/resolv/res_mkquery.c 298120 2016-04-16 17:52:00Z pfg $");
73
74#include "port_before.h"
75#include <sys/types.h>
76#include <sys/param.h>
77#include <netinet/in.h>
78#include <arpa/nameser.h>
79#include <netdb.h>
80#include <resolv.h>

--- 47 unchanged lines hidden (view full) ---

128 hp->opcode = op;
129 hp->rd = (statp->options & RES_RECURSE) != 0U;
130 hp->rcode = NOERROR;
131 cp = buf + HFIXEDSZ;
132 ep = buf + buflen;
133 dpp = dnptrs;
134 *dpp++ = buf;
135 *dpp++ = NULL;
73
74#include "port_before.h"
75#include <sys/types.h>
76#include <sys/param.h>
77#include <netinet/in.h>
78#include <arpa/nameser.h>
79#include <netdb.h>
80#include <resolv.h>

--- 47 unchanged lines hidden (view full) ---

128 hp->opcode = op;
129 hp->rd = (statp->options & RES_RECURSE) != 0U;
130 hp->rcode = NOERROR;
131 cp = buf + HFIXEDSZ;
132 ep = buf + buflen;
133 dpp = dnptrs;
134 *dpp++ = buf;
135 *dpp++ = NULL;
136 lastdnptr = dnptrs + sizeof dnptrs / sizeof dnptrs[0];
136 lastdnptr = dnptrs + nitems(dnptrs);
137 /*
138 * perform opcode specific processing
139 */
140 switch (op) {
141 case QUERY: /*FALLTHROUGH*/
142 case NS_NOTIFY_OP:
143 if (ep - cp < QFIXEDSZ)
144 return (-1);

--- 162 unchanged lines hidden ---
137 /*
138 * perform opcode specific processing
139 */
140 switch (op) {
141 case QUERY: /*FALLTHROUGH*/
142 case NS_NOTIFY_OP:
143 if (ep - cp < QFIXEDSZ)
144 return (-1);

--- 162 unchanged lines hidden ---