diff options
-rw-r--r-- | t/helper/test-genzeros.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/t/helper/test-genzeros.c b/t/helper/test-genzeros.c index 8ca988d621..47af843b68 100644 --- a/t/helper/test-genzeros.c +++ b/t/helper/test-genzeros.c @@ -17,15 +17,16 @@ int cmd__genzeros(int argc, const char **argv) /* Writing out individual NUL bytes is slow... */ while (count < 0) - if (write(1, zeros, ARRAY_SIZE(zeros)) < 0) - return -1; + if (xwrite(1, zeros, ARRAY_SIZE(zeros)) < 0) + die_errno("write error"); while (count > 0) { - n = write(1, zeros, count < ARRAY_SIZE(zeros) ? - count : ARRAY_SIZE(zeros)); + n = xwrite(1, zeros, + count < ARRAY_SIZE(zeros) + ? count : ARRAY_SIZE(zeros)); if (n < 0) - return -1; + die_errno("write error"); count -= n; } |