aboutsummaryrefslogtreecommitdiff
path: root/src/Storage.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Storage.cpp')
-rw-r--r--src/Storage.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/Storage.cpp b/src/Storage.cpp
index 9a1c492..375be57 100644
--- a/src/Storage.cpp
+++ b/src/Storage.cpp
@@ -127,6 +127,7 @@ namespace QuickMedia {
FileType get_file_type(const Path &path) {
struct stat file_stat;
+ memset(&file_stat, 0, sizeof(file_stat));
int ret;
EINTR_RETRY(ret, stat(path.data.c_str(), &file_stat));
if(ret == 0)
@@ -160,6 +161,7 @@ namespace QuickMedia {
int file_get_size(const Path &path, size_t *size) {
struct stat file_stat;
+ memset(&file_stat, 0, sizeof(file_stat));
int ret;
EINTR_RETRY(ret, stat(path.data.c_str(), &file_stat));
if(ret == 0 && S_ISREG(file_stat.st_mode)) {
@@ -172,6 +174,7 @@ namespace QuickMedia {
bool file_get_last_modified_time_seconds(const char *path, time_t *result) {
struct stat file_stat;
+ memset(&file_stat, 0, sizeof(file_stat));
int ret;
EINTR_RETRY(ret, stat(path, &file_stat));
if(ret == 0) {