From a44c204a6250832470408a89c9dd0c1cbc2e3fab Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sun, 8 Aug 2021 10:40:32 +0200 Subject: Set stat to 0 before populating it --- automedia | Bin 120760 -> 120760 bytes src/fileutils.c | 4 ++-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/automedia b/automedia index 25e8856..beb803e 100755 Binary files a/automedia and b/automedia differ diff --git a/src/fileutils.c b/src/fileutils.c index 197a201..131472b 100644 --- a/src/fileutils.c +++ b/src/fileutils.c @@ -53,7 +53,7 @@ int file_get_content(const char *filepath, char **data, long *size) { } int file_get_last_modified_time(const char *path, time_t *last_modified) { - struct stat s; + struct stat s = {0}; if(stat(path, &s) == 0) { *last_modified = s.st_mtim.tv_sec; return 0; @@ -94,7 +94,7 @@ int create_directory_recursive(char *path) { } static int is_directory(const char *path) { - struct stat s; + struct stat s = {0}; if(stat(path, &s) == 0) return S_ISDIR(s.st_mode); return 0; -- cgit v1.2.3