aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/fileutils.c4
1 files changed, 2 insertions, 2 deletions
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;