summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1998-04-30 05:55:07 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1998-04-30 05:55:07 +0000
commitdd54c3189529154d3e721734ddc2124dbcc0ab8b (patch)
tree671478ae3465363683ecbf08473bd02610d37392
parentfd1e6c7f3c25d831d0731a4c23eed63ae62fa97f (diff)
Wall
-rw-r--r--bin/dd/dd.c7
-rw-r--r--bin/ed/buf.c9
-rw-r--r--bin/ed/glbl.c7
-rw-r--r--bin/rmail/rmail.c7
4 files changed, 17 insertions, 13 deletions
diff --git a/bin/dd/dd.c b/bin/dd/dd.c
index 5202ee0d86d..601da2b113c 100644
--- a/bin/dd/dd.c
+++ b/bin/dd/dd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dd.c,v 1.7 1997/11/15 22:10:22 todd Exp $ */
+/* $OpenBSD: dd.c,v 1.8 1998/04/30 05:55:02 deraadt Exp $ */
/* $NetBSD: dd.c,v 1.6 1996/02/20 19:29:06 jtc Exp $ */
/*-
@@ -48,7 +48,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)dd.c 8.5 (Berkeley) 4/2/94";
#else
-static char rcsid[] = "$OpenBSD: dd.c,v 1.7 1997/11/15 22:10:22 todd Exp $";
+static char rcsid[] = "$OpenBSD: dd.c,v 1.8 1998/04/30 05:55:02 deraadt Exp $";
#endif
#endif /* not lint */
@@ -237,11 +237,12 @@ dd_in()
* Zero the buffer first if sync; if doing block operations
* use spaces.
*/
- if (ddflags & C_SYNC)
+ if (ddflags & C_SYNC) {
if (ddflags & (C_BLOCK|C_UNBLOCK))
(void)memset(in.dbp, ' ', in.dbsz);
else
(void)memset(in.dbp, 0, in.dbsz);
+ }
n = read(in.fd, in.dbp, in.dbsz);
if (n == 0) {
diff --git a/bin/ed/buf.c b/bin/ed/buf.c
index bb853e9b40c..6f170c575df 100644
--- a/bin/ed/buf.c
+++ b/bin/ed/buf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: buf.c,v 1.7 1998/03/10 17:55:38 deraadt Exp $ */
+/* $OpenBSD: buf.c,v 1.8 1998/04/30 05:55:04 deraadt Exp $ */
/* $NetBSD: buf.c,v 1.15 1995/04/23 10:07:28 cgd Exp $ */
/* buf.c: This file contains the scratch-file buffer rountines for the
@@ -33,7 +33,7 @@
#if 0
static char *rcsid = "@(#)buf.c,v 1.4 1994/02/01 00:34:35 alm Exp";
#else
-static char rcsid[] = "$OpenBSD: buf.c,v 1.7 1998/03/10 17:55:38 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: buf.c,v 1.8 1998/04/30 05:55:04 deraadt Exp $";
#endif
#endif /* not lint */
@@ -173,7 +173,7 @@ get_addressed_line_node(n)
static long on = 0;
SPL1();
- if (n > on)
+ if (n > on) {
if (n <= (on + addr_last) >> 1)
for (; on < n; on++)
lp = lp->q_forw;
@@ -182,7 +182,7 @@ get_addressed_line_node(n)
for (on = addr_last; on > n; on--)
lp = lp->q_back;
}
- else
+ } else {
if (n >= on >> 1)
for (; on > n; on--)
lp = lp->q_back;
@@ -191,6 +191,7 @@ get_addressed_line_node(n)
for (on = 0; on < n; on++)
lp = lp->q_forw;
}
+ }
SPL0();
return lp;
}
diff --git a/bin/ed/glbl.c b/bin/ed/glbl.c
index a0a4d148a7f..cc66ffc62e0 100644
--- a/bin/ed/glbl.c
+++ b/bin/ed/glbl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: glbl.c,v 1.6 1997/09/01 18:29:28 deraadt Exp $ */
+/* $OpenBSD: glbl.c,v 1.7 1998/04/30 05:55:05 deraadt Exp $ */
/* $NetBSD: glbl.c,v 1.2 1995/03/21 09:04:41 cgd Exp $ */
/* glob.c: This file contains the global command routines for the ed line
@@ -33,7 +33,7 @@
#if 0
static char *rcsid = "@(#)glob.c,v 1.1 1994/02/01 00:34:40 alm Exp";
#else
-static char rcsid[] = "$OpenBSD: glbl.c,v 1.6 1997/09/01 18:29:28 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: glbl.c,v 1.7 1998/04/30 05:55:05 deraadt Exp $";
#endif
#endif /* not lint */
@@ -92,11 +92,12 @@ exec_global(interact, gflag)
char *cmd = NULL;
#ifdef BACKWARDS
- if (!interact)
+ if (!interact) {
if (!strcmp(ibufp, "\n"))
cmd = "p\n"; /* null cmd-list == `p' */
else if ((cmd = get_extended_line(&n, 0)) == NULL)
return ERR;
+ }
#else
if (!interact && (cmd = get_extended_line(&n, 0)) == NULL)
return ERR;
diff --git a/bin/rmail/rmail.c b/bin/rmail/rmail.c
index 4bc5282ae32..40752724312 100644
--- a/bin/rmail/rmail.c
+++ b/bin/rmail/rmail.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rmail.c,v 1.8 1997/09/01 18:30:29 deraadt Exp $ */
+/* $OpenBSD: rmail.c,v 1.9 1998/04/30 05:55:06 deraadt Exp $ */
/* $NetBSD: rmail.c,v 1.8 1995/09/07 06:51:50 jtc Exp $ */
/*
@@ -44,7 +44,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)rmail.c 8.3 (Berkeley) 5/15/95";
#else
-static char rcsid[] = "$OpenBSD: rmail.c,v 1.8 1997/09/01 18:30:29 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: rmail.c,v 1.9 1998/04/30 05:55:06 deraadt Exp $";
#endif
#endif /* not lint */
@@ -169,7 +169,7 @@ main(argc, argv)
}
/* Else use the string up to the last bang. */
- if (p == NULL)
+ if (p == NULL) {
if (*addrp == '!')
err(EX_DATAERR,
"bang starts address: %s", addrp);
@@ -183,6 +183,7 @@ main(argc, argv)
if (debug)
(void)fprintf(stderr, "bang: %s\n", p);
}
+ }
/* 'p' now points to any system string from this line. */
if (p != NULL) {