diff options
| author | John Birrell <jb@FreeBSD.org> | 1998-02-20 05:08:53 +0000 |
|---|---|---|
| committer | John Birrell <jb@FreeBSD.org> | 1998-02-20 05:08:53 +0000 |
| commit | 2ffc76323464b438f09e8521b3a8675da126bdbc (patch) | |
| tree | 8aa8f3e4d77aec1de15c08af1ecc6d8b2b43aa62 /usr.bin/fetch | |
| parent | 56d73492e16d4edc755a2ae8f7d497d4e4d4ec7c (diff) | |
Notes
Diffstat (limited to 'usr.bin/fetch')
| -rw-r--r-- | usr.bin/fetch/util.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.bin/fetch/util.c b/usr.bin/fetch/util.c index 49c11084cc79..1a927626e40e 100644 --- a/usr.bin/fetch/util.c +++ b/usr.bin/fetch/util.c @@ -26,7 +26,7 @@ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: util.c,v 1.4 1997/02/07 17:55:01 wollman Exp $ + * $Id: util.c,v 1.5 1997/02/11 20:46:06 wollman Exp $ */ #include <sys/types.h> @@ -89,13 +89,15 @@ void adjmodtime(struct fetch_state *fs) { struct timeval tv[2]; + time_t tt; /* XXX - not strictly correct, since (time_t)-1 does not have to be > 0. This also catches some of the other routines which erroneously return 0 for invalid times rather than -1. */ if (!fs->fs_newtime && fs->fs_modtime > 0) { tv[0].tv_usec = tv[1].tv_usec = 0; - time(&tv[0].tv_sec); + time(&tt); + tv[0].tv_sec = tt; tv[1].tv_sec = fs->fs_modtime; utimes(fs->fs_outputfile, tv); } |
