Deleted Added
full compact
getproto_test.c (292323) getproto_test.c (298830)
1/*-
2 * Copyright (c) 2006 Michael Bushkov <bushman@freebsd.org>
3 * 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

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

21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
26 */
27
28#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2006 Michael Bushkov <bushman@freebsd.org>
3 * 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

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

21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
26 */
27
28#include <sys/cdefs.h>
29__FBSDID("$FreeBSD: head/lib/libc/tests/nss/getproto_test.c 292323 2015-12-16 08:09:03Z ngie $");
29__FBSDID("$FreeBSD: head/lib/libc/tests/nss/getproto_test.c 298830 2016-04-30 01:24:24Z pfg $");
30
31#include <arpa/inet.h>
32#include <assert.h>
33#include <errno.h>
34#include <netdb.h>
35#include <stdio.h>
36#include <stdlib.h>
37#include <string.h>

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

310 return (0);
311errfin:
312 printf("incorrect\n");
313
314 return (-1);
315}
316
317/* protoent_check_ambiguity() is needed when one port+proto is associated with
30
31#include <arpa/inet.h>
32#include <assert.h>
33#include <errno.h>
34#include <netdb.h>
35#include <stdio.h>
36#include <stdlib.h>
37#include <string.h>

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

310 return (0);
311errfin:
312 printf("incorrect\n");
313
314 return (-1);
315}
316
317/* protoent_check_ambiguity() is needed when one port+proto is associated with
318 * more than one peice (these cases are usually marked as PROBLEM in
319 * /etc/peices. This functions is needed also when one peice+proto is
318 * more than one piece (these cases are usually marked as PROBLEM in
319 * /etc/peices. This functions is needed also when one piece+proto is
320 * associated with several ports. We have to check all the protoent structures
321 * to make sure that pe really exists and correct */
322static int
323protoent_check_ambiguity(struct protoent_test_data *td, struct protoent *pe)
324{
325
326 return (TEST_DATA_FIND(protoent, td, pe, compare_protoent,
327 NULL) != NULL ? 0 : -1);

--- 229 unchanged lines hidden ---
320 * associated with several ports. We have to check all the protoent structures
321 * to make sure that pe really exists and correct */
322static int
323protoent_check_ambiguity(struct protoent_test_data *td, struct protoent *pe)
324{
325
326 return (TEST_DATA_FIND(protoent, td, pe, compare_protoent,
327 NULL) != NULL ? 0 : -1);

--- 229 unchanged lines hidden ---