summaryrefslogtreecommitdiff
path: root/lib/libc
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2000-08-24 17:04:13 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2000-08-24 17:04:13 +0000
commit90764cf33b8b9e10abd667c96a9ac6e4f74b735d (patch)
treec9bd79a2b93f0d51b2974f06fb2549826044c397 /lib/libc
parente0daf4e242491907fa3fb61c682b780c014d1489 (diff)
KNF
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/gen/fts.c6
-rw-r--r--lib/libc/gen/login_cap.c8
2 files changed, 7 insertions, 7 deletions
diff --git a/lib/libc/gen/fts.c b/lib/libc/gen/fts.c
index 790d665a64f..e28cf9bbd94 100644
--- a/lib/libc/gen/fts.c
+++ b/lib/libc/gen/fts.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fts.c,v 1.23 1999/10/03 20:39:53 millert Exp $ */
+/* $OpenBSD: fts.c,v 1.24 2000/08/24 17:04:12 deraadt Exp $ */
/*-
* Copyright (c) 1990, 1993, 1994
@@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "@(#)fts.c 8.6 (Berkeley) 8/14/94";
#else
-static char rcsid[] = "$OpenBSD: fts.c,v 1.23 1999/10/03 20:39:53 millert Exp $";
+static char rcsid[] = "$OpenBSD: fts.c,v 1.24 2000/08/24 17:04:12 deraadt Exp $";
#endif
#endif /* LIBC_SCCS and not lint */
@@ -216,7 +216,7 @@ fts_close(sp)
FTS *sp;
{
register FTSENT *freep, *p;
- int saved_errno;
+ int saved_errno = 0;
/*
* This still works if we haven't read anything -- the dummy structure
diff --git a/lib/libc/gen/login_cap.c b/lib/libc/gen/login_cap.c
index a48cff4458e..7f4c566f853 100644
--- a/lib/libc/gen/login_cap.c
+++ b/lib/libc/gen/login_cap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: login_cap.c,v 1.1 2000/08/20 18:37:20 millert Exp $ */
+/* $OpenBSD: login_cap.c,v 1.2 2000/08/24 17:03:47 deraadt Exp $ */
/*-
* Copyright (c) 1995,1997 Berkeley Software Design, Inc. All rights reserved.
@@ -64,7 +64,7 @@ login_getclass(class)
{
char *classfiles[2];
login_cap_t *lc;
- int res, i;
+ int res;
if (secure_path(_PATH_LOGIN_CONF) == 0) {
classfiles[0] = _PATH_LOGIN_CONF;
@@ -646,13 +646,13 @@ setuserpath(lc, home)
hlen = strlen(home);
- if (p = path = login_getcapstr(lc, "path", NULL, NULL)) {
+ if ((p = path = login_getcapstr(lc, "path", NULL, NULL))) {
while (*p)
if (*p++ == '~')
++cnt;
plen = (p - path) + cnt * (hlen + 1) + 1;
p = path;
- if (q = path = malloc(plen)) {
+ if ((q = path = malloc(plen))) {
while (*p) {
p += strspn(p, " \t");
if (*p == '\0')