Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

filetransfer: Fix getFileCreationDate2 stat check #361

Merged
merged 1 commit into from
May 10, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/lib/dlt_filetransfer.c
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ void getFileCreationDate2(const char *file, int *ok, char *date)

if (-1 == stat(file, &st)) {
*ok = 0;
date = 0;
return;
}

*ok = 1;
Expand Down Expand Up @@ -259,7 +259,7 @@ void dlt_user_log_file_errorMessage(DltContext *fileContext, const char *filenam
DLT_STRING(filename));
}

char fcreationdate[50];
char fcreationdate[50] = {0};
getFileCreationDate2(filename, &ok, fcreationdate);

if (!ok) {
Expand Down Expand Up @@ -326,7 +326,7 @@ int dlt_user_log_file_infoAbout(DltContext *fileContext, const char *filename)
DLT_STRING(filename));
}

char creationdate[50];
char creationdate[50] = {0};
getFileCreationDate2(filename, &ok, creationdate);

if (!ok) {
Expand Down Expand Up @@ -475,7 +475,7 @@ int dlt_user_log_file_header_alias(DltContext *fileContext, const char *filename
DLT_STRING(filename));
}

char fcreationdate[50];
char fcreationdate[50] = {0};
getFileCreationDate2(filename, &ok, fcreationdate);

if (!ok) {
Expand Down Expand Up @@ -536,7 +536,7 @@ int dlt_user_log_file_header(DltContext *fileContext, const char *filename)
DLT_STRING(filename));
}

char fcreationdate[50];
char fcreationdate[50] = {0};
getFileCreationDate2(filename, &ok, fcreationdate);

if (!ok) {
Expand Down