summaryrefslogtreecommitdiff
path: root/source/compiler/aslcompiler.l
diff options
context:
space:
mode:
Diffstat (limited to 'source/compiler/aslcompiler.l')
-rw-r--r--source/compiler/aslcompiler.l16
1 files changed, 8 insertions, 8 deletions
diff --git a/source/compiler/aslcompiler.l b/source/compiler/aslcompiler.l
index 286e62815535..523241a5a557 100644
--- a/source/compiler/aslcompiler.l
+++ b/source/compiler/aslcompiler.l
@@ -110,10 +110,11 @@ NamePathTail [.]{NameSeg}
[ \t] { count (0); }
-"/*" { if (!AslDoComment ()) yyterminate (); }
-"//" { if (!AslDoCommentType2 ()) yyterminate (); }
+"/*" { if (!AslDoComment ()) {yyterminate ();} }
+"//" { if (!AslDoCommentType2 ()) {yyterminate ();} }
-"\"" { if (AslDoStringLiteral ()) return (PARSEOP_STRING_LITERAL); else yyterminate (); }
+"\"" { if (AslDoStringLiteral ()) {return (PARSEOP_STRING_LITERAL);}
+ else {yyterminate ();} }
";" { count (0); return(';'); }
@@ -607,7 +608,7 @@ NamePathTail [.]{NameSeg}
{NameSeg} { char *s;
count (0);
- s=malloc (ACPI_NAME_SIZE + 1);
+ s=UtStringCacheCalloc (ACPI_NAME_SIZE + 1);
if (strcmp (AslCompilertext, "\\"))
{
strcpy (s, "____");
@@ -620,10 +621,9 @@ NamePathTail [.]{NameSeg}
{NameString} { char *s;
count (0);
- s=malloc (strlen (AslCompilertext)+1);
+ s=UtStringCacheCalloc (strlen (AslCompilertext)+1);
AcpiUtStrupr (AslCompilertext);
strcpy (s, AslCompilertext);
- s[strlen (AslCompilertext)] = 0;
AslCompilerlval.s = s;
DbgPrint (ASL_PARSE_OUTPUT, "NameString: %s\n", s);
return (PARSEOP_NAMESTRING); }
@@ -639,9 +639,9 @@ NamePathTail [.]{NameSeg}
AslCompilererror (MsgBuffer);}
<<EOF>> { if (AslPopInputFileStack ())
- yyterminate();
+ {yyterminate();}
else
- return (PARSEOP_INCLUDE_END);};
+ {return (PARSEOP_INCLUDE_END);} };
%%