(scrub_file): do the second seek correctly.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@8255 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -96,8 +96,7 @@ scrub_file (int fd)
|
|||||||
pos = lseek(fd, 0, SEEK_END);
|
pos = lseek(fd, 0, SEEK_END);
|
||||||
if (pos < 0)
|
if (pos < 0)
|
||||||
return errno;
|
return errno;
|
||||||
pos = lseek(fd, 0, SEEK_SET);
|
if (lseek(fd, 0, SEEK_SET) < 0)
|
||||||
if (pos < 0)
|
|
||||||
return errno;
|
return errno;
|
||||||
memset(buf, 0, sizeof(buf));
|
memset(buf, 0, sizeof(buf));
|
||||||
while(pos > 0) {
|
while(pos > 0) {
|
||||||
|
Reference in New Issue
Block a user