summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/mtree/compare.c9
-rw-r--r--usr.sbin/mtree/create.c12
-rw-r--r--usr.sbin/mtree/mtree.c8
-rw-r--r--usr.sbin/mtree/spec.c6
-rw-r--r--usr.sbin/mtree/verify.c9
5 files changed, 24 insertions, 20 deletions
diff --git a/usr.sbin/mtree/compare.c b/usr.sbin/mtree/compare.c
index 5d0c57828a2..557346b25fc 100644
--- a/usr.sbin/mtree/compare.c
+++ b/usr.sbin/mtree/compare.c
@@ -1,5 +1,5 @@
/* $NetBSD: compare.c,v 1.11 1996/09/05 09:56:48 mycroft Exp $ */
-/* $OpenBSD: compare.c,v 1.11 2001/08/10 02:33:46 millert Exp $ */
+/* $OpenBSD: compare.c,v 1.12 2001/08/10 02:37:14 millert Exp $ */
/*-
* Copyright (c) 1989, 1993
@@ -36,9 +36,9 @@
#ifndef lint
#if 0
-static char sccsid[] = "@(#)compare.c 8.1 (Berkeley) 6/6/93";
+static const char sccsid[] = "@(#)compare.c 8.1 (Berkeley) 6/6/93";
#else
-static char rcsid[] = "$OpenBSD: compare.c,v 1.11 2001/08/10 02:33:46 millert Exp $";
+static const char rcsid[] = "$OpenBSD: compare.c,v 1.12 2001/08/10 02:37:14 millert Exp $";
#endif
#endif /* not lint */
@@ -215,7 +215,7 @@ typeerr: LABEL;
tab = "\t";
}
}
- if (s->flags & F_CKSUM)
+ if (s->flags & F_CKSUM) {
if ((fd = open(p->fts_accpath, O_RDONLY, 0)) < 0) {
LABEL;
(void)printf("%scksum: %s: %s\n",
@@ -236,6 +236,7 @@ typeerr: LABEL;
}
tab = "\t";
}
+ }
if (s->flags & F_MD5) {
char *new_digest, buf[33];
diff --git a/usr.sbin/mtree/create.c b/usr.sbin/mtree/create.c
index 12a2ab0fdaa..2c6b5493643 100644
--- a/usr.sbin/mtree/create.c
+++ b/usr.sbin/mtree/create.c
@@ -1,5 +1,5 @@
/* $NetBSD: create.c,v 1.11 1996/09/05 09:24:19 mycroft Exp $ */
-/* $OpenBSD: create.c,v 1.12 2001/08/10 02:33:46 millert Exp $ */
+/* $OpenBSD: create.c,v 1.13 2001/08/10 02:37:14 millert Exp $ */
/*-
* Copyright (c) 1989, 1993
@@ -36,9 +36,9 @@
#ifndef lint
#if 0
-static char sccsid[] = "@(#)create.c 8.1 (Berkeley) 6/6/93";
+static const char sccsid[] = "@(#)create.c 8.1 (Berkeley) 6/6/93";
#else
-static char rcsid[] = "$OpenBSD: create.c,v 1.12 2001/08/10 02:33:46 millert Exp $";
+static const char rcsid[] = "$OpenBSD: create.c,v 1.13 2001/08/10 02:37:14 millert Exp $";
#endif
#endif /* not lint */
@@ -314,18 +314,20 @@ statd(t, parent, puid, pgid, pmode)
(void)printf("/set type=dir");
else
(void)printf("/set type=file");
- if (keys & F_UNAME)
+ if (keys & F_UNAME) {
if ((pw = getpwuid(saveuid)) != NULL)
(void)printf(" uname=%s", pw->pw_name);
else
error("could not get uname for uid=%u", saveuid);
+ }
if (keys & F_UID)
(void)printf(" uid=%u", saveuid);
- if (keys & F_GNAME)
+ if (keys & F_GNAME) {
if ((gr = getgrgid(savegid)) != NULL)
(void)printf(" gname=%s", gr->gr_name);
else
error("could not get gname for gid=%u", savegid);
+ }
if (keys & F_GID)
(void)printf(" gid=%u", savegid);
if (keys & F_MODE)
diff --git a/usr.sbin/mtree/mtree.c b/usr.sbin/mtree/mtree.c
index 4c083ffd258..104d147e469 100644
--- a/usr.sbin/mtree/mtree.c
+++ b/usr.sbin/mtree/mtree.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mtree.c,v 1.11 2000/01/20 00:20:14 millert Exp $ */
+/* $OpenBSD: mtree.c,v 1.12 2001/08/10 02:37:14 millert Exp $ */
/* $NetBSD: mtree.c,v 1.7 1996/09/05 23:29:22 thorpej Exp $ */
/*-
@@ -35,16 +35,16 @@
*/
#ifndef lint
-static char copyright[] =
+static const char copyright[] =
"@(#) Copyright (c) 1989, 1990, 1993\n\
The Regents of the University of California. All rights reserved.\n";
#endif /* not lint */
#ifndef lint
#if 0
-static char sccsid[] = "@(#)mtree.c 8.1 (Berkeley) 6/6/93";
+static const char sccsid[] = "@(#)mtree.c 8.1 (Berkeley) 6/6/93";
#else
-static char rcsid[] = "$OpenBSD: mtree.c,v 1.11 2000/01/20 00:20:14 millert Exp $";
+static const char rcsid[] = "$OpenBSD: mtree.c,v 1.12 2001/08/10 02:37:14 millert Exp $";
#endif
#endif /* not lint */
diff --git a/usr.sbin/mtree/spec.c b/usr.sbin/mtree/spec.c
index c1672acc81f..0c6960de39c 100644
--- a/usr.sbin/mtree/spec.c
+++ b/usr.sbin/mtree/spec.c
@@ -1,5 +1,5 @@
/* $NetBSD: spec.c,v 1.6 1995/03/07 21:12:12 cgd Exp $ */
-/* $OpenBSD: spec.c,v 1.11 2001/08/10 02:33:46 millert Exp $ */
+/* $OpenBSD: spec.c,v 1.12 2001/08/10 02:37:14 millert Exp $ */
/*-
* Copyright (c) 1989, 1993
@@ -36,9 +36,9 @@
#ifndef lint
#if 0
-static char sccsid[] = "@(#)spec.c 8.1 (Berkeley) 6/6/93";
+static const char sccsid[] = "@(#)spec.c 8.1 (Berkeley) 6/6/93";
#else
-static char rcsid[] = "$OpenBSD: spec.c,v 1.11 2001/08/10 02:33:46 millert Exp $";
+static const char rcsid[] = "$OpenBSD: spec.c,v 1.12 2001/08/10 02:37:14 millert Exp $";
#endif
#endif /* not lint */
diff --git a/usr.sbin/mtree/verify.c b/usr.sbin/mtree/verify.c
index e32e8259c21..f1f1b36e43f 100644
--- a/usr.sbin/mtree/verify.c
+++ b/usr.sbin/mtree/verify.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: verify.c,v 1.6 1998/08/20 20:11:42 marc Exp $ */
+/* $OpenBSD: verify.c,v 1.7 2001/08/10 02:37:14 millert Exp $ */
/* $NetBSD: verify.c,v 1.10 1995/03/07 21:26:28 cgd Exp $ */
/*-
@@ -36,9 +36,9 @@
#ifndef lint
#if 0
-static char sccsid[] = "@(#)verify.c 8.1 (Berkeley) 6/6/93";
+static const char sccsid[] = "@(#)verify.c 8.1 (Berkeley) 6/6/93";
#else
-static char rcsid[] = "$OpenBSD: verify.c,v 1.6 1998/08/20 20:11:42 marc Exp $";
+static const char rcsid[] = "$OpenBSD: verify.c,v 1.7 2001/08/10 02:37:14 millert Exp $";
#endif
#endif /* not lint */
@@ -185,7 +185,7 @@ miss(p, tail)
}
create = 0;
- if (!(p->flags & F_VISIT) && uflag)
+ if (!(p->flags & F_VISIT) && uflag) {
if (!(p->flags & (F_UID | F_UNAME)))
(void)printf(" (not created: user not specified)");
else if (!(p->flags & (F_GID | F_GNAME)))
@@ -199,6 +199,7 @@ miss(p, tail)
create = 1;
(void)printf(" (created)");
}
+ }
if (!(p->flags & F_VISIT))
(void)putchar('\n');