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
This commit is contained in:
ben.lemasurier@gmail.com 2011-08-02 15:08:28 +00:00
parent b41f982d59
commit 5a6ef54b36
1 changed files with 3 additions and 0 deletions

View File

@ -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);
}