Include assert.h.
authorJim Meyering <jim@meyering.net>
Sat, 28 Oct 2000 11:49:52 +0000 (11:49 +0000)
committerJim Meyering <jim@meyering.net>
Sat, 28 Oct 2000 11:49:52 +0000 (11:49 +0000)
commit37c05b6267140d4afd11ad96cc244e8cd851083c
tree23cdfaa3c63b83eb03d1e29ec86f56ac71d904f6
parent37bcdce62a583c352176d09d7d2d5f7fd2149ae7
Include assert.h.
(fillrand): Add a parameter, size_max.
Add an assertion.
Adjust caller.
(dopass): Break out of the `for (;;)' loop if size < offset.
That can happen now that dopass is called with SIZE == -1.
(do_wipefd): Accept a length of zero only for a regular file.
If lseek fails or returns 0 for a non-regular file, let dopass
determine the length.
Inspired by a patch from Alan Iwi.
src/shred.c