diff options
author | 1997-07-23 20:55:17 +0000 | |
---|---|---|
committer | 1997-07-23 20:55:17 +0000 | |
commit | c9e664a1981feb654163b05e3672911476b92930 (patch) | |
tree | 8e0a5ada91f916f7e615097fd63301adb9dbd28a /lib/libc/gen/getcap.c | |
parent | add atalk (diff) | |
download | wireguard-openbsd-c9e664a1981feb654163b05e3672911476b92930.tar.xz wireguard-openbsd-c9e664a1981feb654163b05e3672911476b92930.zip |
tabify
Diffstat (limited to 'lib/libc/gen/getcap.c')
-rw-r--r-- | lib/libc/gen/getcap.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/lib/libc/gen/getcap.c b/lib/libc/gen/getcap.c index 607b7375792..e3833211cbe 100644 --- a/lib/libc/gen/getcap.c +++ b/lib/libc/gen/getcap.c @@ -35,7 +35,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: getcap.c,v 1.5 1997/06/10 21:44:15 millert Exp $"; +static char rcsid[] = "$OpenBSD: getcap.c,v 1.6 1997/07/23 21:04:04 kstailey Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/types.h> @@ -80,18 +80,18 @@ cgetset(ent) if (ent == NULL) { if (toprec) free(toprec); - toprec = NULL; - topreclen = 0; - return (0); - } - topreclen = strlen(ent); - if ((toprec = malloc (topreclen + 1)) == NULL) { + toprec = NULL; + topreclen = 0; + return (0); + } + topreclen = strlen(ent); + if ((toprec = malloc (topreclen + 1)) == NULL) { errno = ENOMEM; - return (-1); + return (-1); } gottoprec = 0; - (void)strcpy(toprec, ent); - return (0); + (void)strcpy(toprec, ent); + return (0); } /* @@ -207,7 +207,7 @@ getent(cap, len, db_array, fd, name, depth, nfield) /* * Check if we have a top record from cgetset(). - */ + */ if (depth == 0 && toprec != NULL && cgetmatch(toprec, name) == 0) { if ((record = malloc (topreclen + BFRAG)) == NULL) { errno = ENOMEM; @@ -643,7 +643,7 @@ cgetclose() */ int cgetnext(bp, db_array) - register char **bp; + register char **bp; char **db_array; { size_t len; |