res_init.c (292250) | res_init.c (297790) |
---|---|
1/* 2 * Copyright (c) 1985, 1989, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 55 unchanged lines hidden (view full) --- 64 * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 65 */ 66 67#if defined(LIBC_SCCS) && !defined(lint) 68static const char sccsid[] = "@(#)res_init.c 8.1 (Berkeley) 6/7/93"; 69static const char rcsid[] = "$Id: res_init.c,v 1.26 2008/12/11 09:59:00 marka Exp $"; 70#endif /* LIBC_SCCS and not lint */ 71#include <sys/cdefs.h> | 1/* 2 * Copyright (c) 1985, 1989, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 55 unchanged lines hidden (view full) --- 64 * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 65 */ 66 67#if defined(LIBC_SCCS) && !defined(lint) 68static const char sccsid[] = "@(#)res_init.c 8.1 (Berkeley) 6/7/93"; 69static const char rcsid[] = "$Id: res_init.c,v 1.26 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_init.c 292250 2015-12-15 05:37:09Z ngie $"); | 72__FBSDID("$FreeBSD: head/lib/libc/resolv/res_init.c 297790 2016-04-10 19:33:58Z pfg $"); |
73 74#include "port_before.h" 75 76#include "namespace.h" 77 78#include <sys/types.h> 79#include <sys/param.h> 80#include <sys/socket.h> --- 229 unchanged lines hidden (view full) --- 310 n = 0; 311 havesearch = 1; 312 } 313 } 314 /* null terminate last domain if there are excess */ 315 while (*cp != '\0' && *cp != ' ' && *cp != '\t' && *cp != '\n') 316 cp++; 317 *cp = '\0'; | 73 74#include "port_before.h" 75 76#include "namespace.h" 77 78#include <sys/types.h> 79#include <sys/param.h> 80#include <sys/socket.h> --- 229 unchanged lines hidden (view full) --- 310 n = 0; 311 havesearch = 1; 312 } 313 } 314 /* null terminate last domain if there are excess */ 315 while (*cp != '\0' && *cp != ' ' && *cp != '\t' && *cp != '\n') 316 cp++; 317 *cp = '\0'; |
318 *pp++ = 0; | 318 *pp++ = NULL; |
319 } 320 321#define MATCH(line, name) \ 322 (!strncmp(line, name, sizeof(name) - 1) && \ 323 (line[sizeof(name) - 1] == ' ' || \ 324 line[sizeof(name) - 1] == '\t')) 325 326 nserv = 0; --- 59 unchanged lines hidden (view full) --- 386 *pp++ = cp; 387 n = 0; 388 } 389 } 390 /* null terminate last domain if there are excess */ 391 while (*cp != '\0' && *cp != ' ' && *cp != '\t') 392 cp++; 393 *cp = '\0'; | 319 } 320 321#define MATCH(line, name) \ 322 (!strncmp(line, name, sizeof(name) - 1) && \ 323 (line[sizeof(name) - 1] == ' ' || \ 324 line[sizeof(name) - 1] == '\t')) 325 326 nserv = 0; --- 59 unchanged lines hidden (view full) --- 386 *pp++ = cp; 387 n = 0; 388 } 389 } 390 /* null terminate last domain if there are excess */ 391 while (*cp != '\0' && *cp != ' ' && *cp != '\t') 392 cp++; 393 *cp = '\0'; |
394 *pp++ = 0; | 394 *pp++ = NULL; |
395 havesearch = 1; 396 continue; 397 } 398 /* read nameservers to query */ 399 if (MATCH(buf, "nameserver") && nserv < maxns) { 400 struct addrinfo hints, *ai; 401 char sbuf[NI_MAXSERV]; 402 const size_t minsiz = --- 546 unchanged lines hidden --- | 395 havesearch = 1; 396 continue; 397 } 398 /* read nameservers to query */ 399 if (MATCH(buf, "nameserver") && nserv < maxns) { 400 struct addrinfo hints, *ai; 401 char sbuf[NI_MAXSERV]; 402 const size_t minsiz = --- 546 unchanged lines hidden --- |