From d2d8614e57714bc4370777ef5c005ebca630111e Mon Sep 17 00:00:00 2001 From: Assar Westerlund Date: Tue, 16 May 2000 00:02:32 +0000 Subject: [PATCH] (scrub_file): do the second seek correctly. git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@8255 ec53bebd-3082-4978-b11e-865c3cabbd6b --- lib/krb5/fcache.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/krb5/fcache.c b/lib/krb5/fcache.c index 4c049fa3a..61c1013b7 100644 --- a/lib/krb5/fcache.c +++ b/lib/krb5/fcache.c @@ -96,8 +96,7 @@ scrub_file (int fd) pos = lseek(fd, 0, SEEK_END); if (pos < 0) return errno; - pos = lseek(fd, 0, SEEK_SET); - if (pos < 0) + if (lseek(fd, 0, SEEK_SET) < 0) return errno; memset(buf, 0, sizeof(buf)); while(pos > 0) {