summaryrefslogtreecommitdiff
path: root/bin/dd
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 /bin/dd
parentfd1e6c7f3c25d831d0731a4c23eed63ae62fa97f (diff)
Wall
Diffstat (limited to 'bin/dd')
-rw-r--r--bin/dd/dd.c7
1 files changed, 4 insertions, 3 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) {