Deleted Added
full compact
getcap.c (199784) getcap.c (241046)
1/*-
2 * Copyright (c) 1992, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * Casey Leedom of Lawrence Livermore National Laboratory.
7 *
8 * Redistribution and use in source and binary forms, with or without

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

29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 * SUCH DAMAGE.
31 */
32
33#if defined(LIBC_SCCS) && !defined(lint)
34static char sccsid[] = "@(#)getcap.c 8.3 (Berkeley) 3/25/94";
35#endif /* LIBC_SCCS and not lint */
36#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 1992, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * Casey Leedom of Lawrence Livermore National Laboratory.
7 *
8 * Redistribution and use in source and binary forms, with or without

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

29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 * SUCH DAMAGE.
31 */
32
33#if defined(LIBC_SCCS) && !defined(lint)
34static char sccsid[] = "@(#)getcap.c 8.3 (Berkeley) 3/25/94";
35#endif /* LIBC_SCCS and not lint */
36#include <sys/cdefs.h>
37__FBSDID("$FreeBSD: head/lib/libc/gen/getcap.c 199784 2009-11-25 04:45:45Z wollman $");
37__FBSDID("$FreeBSD: head/lib/libc/gen/getcap.c 241046 2012-09-29 11:54:34Z jilles $");
38
39#include "namespace.h"
40#include <sys/types.h>
41
42#include <ctype.h>
43#include <errno.h>
44#include <fcntl.h>
45#include <limits.h>

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

259 if (cbuf == NULL) {
260 errno = ENOMEM;
261 return (-2);
262 }
263 *len = strlen(cbuf);
264 *cap = cbuf;
265 return (retval);
266 } else {
38
39#include "namespace.h"
40#include <sys/types.h>
41
42#include <ctype.h>
43#include <errno.h>
44#include <fcntl.h>
45#include <limits.h>

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

259 if (cbuf == NULL) {
260 errno = ENOMEM;
261 return (-2);
262 }
263 *len = strlen(cbuf);
264 *cap = cbuf;
265 return (retval);
266 } else {
267 fd = _open(*db_p, O_RDONLY, 0);
267 fd = _open(*db_p, O_RDONLY | O_CLOEXEC, 0);
268 if (fd < 0)
269 continue;
270 myfd = 1;
271 }
272 }
273 /*
274 * Find the requested capability record ...
275 */

--- 780 unchanged lines hidden ---
268 if (fd < 0)
269 continue;
270 myfd = 1;
271 }
272 }
273 /*
274 * Find the requested capability record ...
275 */

--- 780 unchanged lines hidden ---