Deleted Added
full compact
res_query.c (186090) res_query.c (254700)
1/*
2 * Copyright (c) 1988, 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_query.c 8.1 (Berkeley) 6/4/93";
69static const char rcsid[] = "$Id: res_query.c,v 1.7.18.2 2008/04/03 23:15:15 marka Exp $";
70#endif /* LIBC_SCCS and not lint */
71#include <sys/cdefs.h>
1/*
2 * Copyright (c) 1988, 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_query.c 8.1 (Berkeley) 6/4/93";
69static const char rcsid[] = "$Id: res_query.c,v 1.7.18.2 2008/04/03 23:15:15 marka Exp $";
70#endif /* LIBC_SCCS and not lint */
71#include <sys/cdefs.h>
72__FBSDID("$FreeBSD: head/lib/libc/resolv/res_query.c 186090 2008-12-14 19:39:53Z ume $");
72__FBSDID("$FreeBSD: head/lib/libc/resolv/res_query.c 254700 2013-08-23 13:59:47Z jilles $");
73
74#include "port_before.h"
75#include <sys/types.h>
76#include <sys/param.h>
77#include <netinet/in.h>
78#include <arpa/inet.h>
79#include <arpa/nameser.h>
80#include <ctype.h>

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

452 char buf[BUFSIZ];
453 FILE *fp;
454
455 if (statp->options & RES_NOALIASES)
456 return (NULL);
457 if (issetugid())
458 return (NULL);
459 file = getenv("HOSTALIASES");
73
74#include "port_before.h"
75#include <sys/types.h>
76#include <sys/param.h>
77#include <netinet/in.h>
78#include <arpa/inet.h>
79#include <arpa/nameser.h>
80#include <ctype.h>

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

452 char buf[BUFSIZ];
453 FILE *fp;
454
455 if (statp->options & RES_NOALIASES)
456 return (NULL);
457 if (issetugid())
458 return (NULL);
459 file = getenv("HOSTALIASES");
460 if (file == NULL || (fp = fopen(file, "r")) == NULL)
460 if (file == NULL || (fp = fopen(file, "re")) == NULL)
461 return (NULL);
462 setbuf(fp, NULL);
463 buf[sizeof(buf) - 1] = '\0';
464 while (fgets(buf, sizeof(buf), fp)) {
465 for (cp1 = buf; *cp1 && !isspace((unsigned char)*cp1); ++cp1)
466 ;
467 if (!*cp1)
468 break;

--- 21 unchanged lines hidden ---
461 return (NULL);
462 setbuf(fp, NULL);
463 buf[sizeof(buf) - 1] = '\0';
464 while (fgets(buf, sizeof(buf), fp)) {
465 for (cp1 = buf; *cp1 && !isspace((unsigned char)*cp1); ++cp1)
466 ;
467 if (!*cp1)
468 break;

--- 21 unchanged lines hidden ---