diff options
author | Robert Moore <Robert.Moore@intel.com> | 2020-01-22 09:43:30 -0800 |
---|---|---|
committer | Robert Moore <Robert.Moore@intel.com> | 2020-01-22 09:43:30 -0800 |
commit | c5ab5abcf82f9b2e8d08776bb9d3644e36cb7d94 (patch) | |
tree | e7b1aa1a0d7cf54355e028fe38e95e3282279822 /source/compiler/aslcompile.c | |
parent | 8d285e942c0d6490cdf7ed0b589af5f9a8942e42 (diff) | |
download | acpica-c5ab5abcf82f9b2e8d08776bb9d3644e36cb7d94.tar.gz |
iASL: Check for errors during timestring conversion
Also use ctime() instead of localtime().
Diffstat (limited to 'source/compiler/aslcompile.c')
-rw-r--r-- | source/compiler/aslcompile.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/source/compiler/aslcompile.c b/source/compiler/aslcompile.c index 0f1455603..9481b6bb2 100644 --- a/source/compiler/aslcompile.c +++ b/source/compiler/aslcompile.c @@ -647,7 +647,7 @@ void AslCompilerFileHeader ( UINT32 FileId) { - struct tm *NewTime; + char *NewTime; time_t Aclock; char *Prefix = ""; @@ -691,13 +691,17 @@ AslCompilerFileHeader ( /* Compilation header with timestamp */ - (void) time (&Aclock); - NewTime = localtime (&Aclock); + Aclock = time (NULL); + NewTime = ctime (&Aclock); FlPrintFile (FileId, - "%sCompilation of \"%s\" - %s%s\n", - Prefix, AslGbl_Files[ASL_FILE_INPUT].Filename, asctime (NewTime), - Prefix); + "%sCompilation of \"%s\" -", + Prefix, AslGbl_Files[ASL_FILE_INPUT].Filename); + + if (NewTime) + { + FlPrintFile (FileId, " %s%s\n", NewTime, Prefix); + } switch (FileId) { |