summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>2008-02-02 07:19:01 +0000
committerobrien <obrien@FreeBSD.org>2008-02-02 07:19:01 +0000
commitffe35eb26b47803f2afa87f651c9608ecfdf56eb (patch)
tree8b63f682d6cf32a7289758aa28152de62cf797ba
parent3a6b566d927099a098917d8317c7aafb000bc7c2 (diff)
parentb8fb0b4b01c6ec73c5a25ae688d15c7eaf8d1d8f (diff)
downloadFreeBSD-src-ffe35eb26b47803f2afa87f651c9608ecfdf56eb.zip
FreeBSD-src-ffe35eb26b47803f2afa87f651c9608ecfdf56eb.tar.gz
This commit was generated by cvs2svn to compensate for changes in r175882,
which included commits to RCS files with non-trunk default branches.
-rw-r--r--contrib/file/magic.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/contrib/file/magic.c b/contrib/file/magic.c
index 84d7c95..8fba30b 100644
--- a/contrib/file/magic.c
+++ b/contrib/file/magic.c
@@ -218,6 +218,7 @@ close_and_restore(const struct magic_set *ms, const char *name, int fd,
*/
#ifdef HAVE_UTIMES
struct timeval utsbuf[2];
+ memset(utsbuf, 0, sizeof(struct timeval) * 2);
utsbuf[0].tv_sec = sb->st_atime;
utsbuf[1].tv_sec = sb->st_mtime;
@@ -225,6 +226,7 @@ close_and_restore(const struct magic_set *ms, const char *name, int fd,
#elif defined(HAVE_UTIME_H) || defined(HAVE_SYS_UTIME_H)
struct utimbuf utbuf;
+ memset(&utbuf, 0, sizeof(struct utimbuf));
utbuf.actime = sb->st_atime;
utbuf.modtime = sb->st_mtime;
(void) utime(name, &utbuf); /* don't care if loses */
OpenPOWER on IntegriCloud