summaryrefslogtreecommitdiff
path: root/regress/sys/kern/pwrite/pwrite.c
diff options
context:
space:
mode:
Diffstat (limited to 'regress/sys/kern/pwrite/pwrite.c')
-rw-r--r--regress/sys/kern/pwrite/pwrite.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/regress/sys/kern/pwrite/pwrite.c b/regress/sys/kern/pwrite/pwrite.c
index caf0cf7b725..b9a1467aea4 100644
--- a/regress/sys/kern/pwrite/pwrite.c
+++ b/regress/sys/kern/pwrite/pwrite.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pwrite.c,v 1.5 2011/11/06 15:00:34 guenther Exp $ */
+/* $OpenBSD: pwrite.c,v 1.6 2014/02/28 16:14:05 espie Exp $ */
/*
* Written by Artur Grabowski <art@openbsd.org> 2002 Public Domain.
*/
@@ -44,6 +44,9 @@ main(int argc, char *argv[])
if (write(fd, &c, 1) != 1)
err(1, "write");
+ if (write(fd, &c, 0) != 0)
+ err(1, "write");
+
if (pread(fd, buf, 10, 0) != 10)
err(1, "pread");