summaryrefslogtreecommitdiff
path: root/source/compiler/aslparseop.c
diff options
context:
space:
mode:
authorJung-uk Kim <jkim@FreeBSD.org>2020-02-14 19:19:39 +0000
committerJung-uk Kim <jkim@FreeBSD.org>2020-02-14 19:19:39 +0000
commitaa36cd6999384cddbfa0d030bcdd44e8bf9c7779 (patch)
tree4f865c7e1146baad112589d1fc57dc6b335c68ec /source/compiler/aslparseop.c
parent8bf5cb5c35eaf503e388d960914add6a539c1e06 (diff)
Merge ACPICA 20200214.vendor/acpica/20200214
Notes
svn path=/vendor-sys/acpica/dist/; revision=357927 svn path=/vendor-sys/acpica/20200214/; revision=357928; tag=vendor/acpica/20200214
Diffstat (limited to 'source/compiler/aslparseop.c')
-rw-r--r--source/compiler/aslparseop.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/source/compiler/aslparseop.c b/source/compiler/aslparseop.c
index b58d4e6623f2..46875413e439 100644
--- a/source/compiler/aslparseop.c
+++ b/source/compiler/aslparseop.c
@@ -743,13 +743,18 @@ TrCreateConstantLeafOp (
/* Get a copy of the current time */
+ Op->Asl.Value.String = "";
CurrentTime = time (NULL);
+
StaticTimeString = ctime (&CurrentTime);
- TimeString = UtLocalCalloc (strlen (StaticTimeString) + 1);
- strcpy (TimeString, StaticTimeString);
+ if (StaticTimeString)
+ {
+ TimeString = UtLocalCalloc (strlen (StaticTimeString) + 1);
+ strcpy (TimeString, StaticTimeString);
- TimeString[strlen(TimeString) -1] = 0; /* Remove trailing newline */
- Op->Asl.Value.String = TimeString;
+ TimeString[strlen(TimeString) -1] = 0; /* Remove trailing newline */
+ Op->Asl.Value.String = TimeString;
+ }
break;
default: /* This would be an internal error */