Rewrite to avoid some unnecessary casts, macros, literals.
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 25 Aug 2006 23:08:58 +0000 (23:08 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Fri, 25 Aug 2006 23:08:58 +0000 (23:08 +0000)
commitdb3f6c256b231300775742c8b956d8451a62d517
treeb6f447385dc9bfec7412643ec244a2f365018c7c
parent03a5310540fbc082eb409db77013cdd74c90f4ae
Rewrite to avoid some unnecessary casts, macros, literals.
(DEFAULT_PASSES, VERBOSE_UPDATE): Now constants, not macros.
(SECTOR_SIZE, SECTOR_MASK): New constants.
(fillpattern, dopass, do_wipefd, main): Remove unnecessary casts,
and use the SECTOR_* constants when applicable.  Check for size <
0 rather than size == -1, since negative-size files are a sign of
trouble anyway.

(dopass): Assume a continuable error if EIO even if the current
position is not a multiple of 512.
src/shred.c