From 5a6ef54b3662c5c1f9ef9a414e32dc7f2686ea77 Mon Sep 17 00:00:00 2001 From: "ben.lemasurier@gmail.com" Date: Tue, 2 Aug 2011 15:08:28 +0000 Subject: [PATCH] trivial change to fix some valgrind warnings regarding unititialized values. git-svn-id: http://s3fs.googlecode.com/svn/trunk@359 df820570-a93a-0410-bd06-b72b767a4274 --- src/s3fs.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/s3fs.cpp b/src/s3fs.cpp index 6f127e0..c74c902 100644 --- a/src/s3fs.cpp +++ b/src/s3fs.cpp @@ -592,6 +592,7 @@ int get_local_fd(const char* path) { // make the file's mtime match that of the file on s3 struct utimbuf n_mtime; n_mtime.modtime = strtoul(responseHeaders["x-amz-meta-mtime"].c_str(), (char **) NULL, 10); + n_mtime.actime = n_mtime.modtime; if((utime(cache_path.c_str(), &n_mtime)) == -1) { YIKES(-errno); } @@ -687,6 +688,7 @@ static int put_headers(const char *path, headers_t meta) { if((stat(cache_path.c_str(), &st)) == 0) { n_mtime.modtime = strtoul(meta["x-amz-meta-mtime"].c_str(), (char **) NULL, 10); + n_mtime.actime = n_mtime.modtime; if((utime(cache_path.c_str(), &n_mtime)) == -1) { YIKES(-errno); } @@ -2403,6 +2405,7 @@ static int s3fs_flush(const char *path, struct fuse_file_info *fi) { if((stat(cache_path.c_str(), &st)) == 0) { n_mtime.modtime = strtoul(meta["x-amz-meta-mtime"].c_str(), (char **) NULL, 10); + n_mtime.actime = n_mtime.modtime; if((utime(cache_path.c_str(), &n_mtime)) == -1) { YIKES(-errno); }