[Bf-blender-cvs] [f3e7c1e8c8c] master: Fix building on Linux as '__time64_t' isn't portable
Campbell Barton
noreply at git.blender.org
Thu Mar 19 01:56:58 CET 2020
Commit: f3e7c1e8c8c17564e5e571c57b3df869b04597db
Author: Campbell Barton
Date: Thu Mar 19 11:50:46 2020 +1100
Branches: master
https://developer.blender.org/rBf3e7c1e8c8c17564e5e571c57b3df869b04597db
Fix building on Linux as '__time64_t' isn't portable
===================================================================
M source/blender/blenkernel/intern/seqcache.c
===================================================================
diff --git a/source/blender/blenkernel/intern/seqcache.c b/source/blender/blenkernel/intern/seqcache.c
index f98af4a9406..e6920c71e24 100644
--- a/source/blender/blenkernel/intern/seqcache.c
+++ b/source/blender/blenkernel/intern/seqcache.c
@@ -262,17 +262,12 @@ static void seq_disk_cache_get_files(SeqDiskCache *disk_cache, char *path)
static DiskCacheFile *seq_disk_cache_get_oldest_file(SeqDiskCache *disk_cache)
{
- DiskCacheFile *cache_file = disk_cache->files.first;
- if (!cache_file) {
+ DiskCacheFile *oldest_file = disk_cache->files.first;
+ if (oldest_file == NULL) {
return NULL;
}
-
- DiskCacheFile *oldest_file = cache_file;
- __time64_t oldest_timestamp = cache_file->fstat.st_mtime;
-
- for (; cache_file; cache_file = cache_file->next) {
- if (cache_file->fstat.st_mtime < oldest_timestamp) {
- oldest_timestamp = cache_file->fstat.st_mtime;
+ for (DiskCacheFile *cache_file = oldest_file->next; cache_file; cache_file = cache_file->next) {
+ if (cache_file->fstat.st_mtime < oldest_file->fstat.st_mtime) {
oldest_file = cache_file;
}
}
More information about the Bf-blender-cvs
mailing list