summaryrefslogtreecommitdiff
path: root/source/tools
diff options
context:
space:
mode:
authorJung-uk Kim <jkim@FreeBSD.org>2016-05-27 21:40:35 +0000
committerJung-uk Kim <jkim@FreeBSD.org>2016-05-27 21:40:35 +0000
commit4d46bb7749ef0cf25eb2b25f2d7324023cb754b4 (patch)
treef7064866b29ad07c184316d5bbb13a4cb187326b /source/tools
parent2331c681155dd7b2f78bd28ca0c183e2f98ff44f (diff)
Notes
Diffstat (limited to 'source/tools')
-rw-r--r--source/tools/acpisrc/asfile.c21
-rw-r--r--source/tools/acpisrc/asremove.c1
2 files changed, 12 insertions, 10 deletions
diff --git a/source/tools/acpisrc/asfile.c b/source/tools/acpisrc/asfile.c
index 257e2ab06ae9..2c595735fccc 100644
--- a/source/tools/acpisrc/asfile.c
+++ b/source/tools/acpisrc/asfile.c
@@ -549,7 +549,8 @@ AsProcessOneFile (
ACPI_NATIVE_INT FileType)
{
char *Pathname;
- char *OutPathname = NULL;
+ char *OutPathname;
+ int Status = 0;
/* Allocate a file pathname buffer for both source and target */
@@ -575,8 +576,8 @@ AsProcessOneFile (
if (AsGetFile (Pathname, &Gbl_FileBuffer, &Gbl_FileSize))
{
- free (Pathname);
- return (-1);
+ Status = -1;
+ goto Exit1;
}
Gbl_HeaderSize = 0;
@@ -619,7 +620,8 @@ AsProcessOneFile (
if (!OutPathname)
{
printf ("Could not allocate buffer for file pathnames\n");
- return (-1);
+ Status = -1;
+ goto Exit2;
}
strcpy (OutPathname, TargetPath);
@@ -630,17 +632,16 @@ AsProcessOneFile (
}
AsPutFile (OutPathname, Gbl_FileBuffer, ConversionTable->Flags);
+ free (OutPathname);
}
}
+Exit2:
free (Gbl_FileBuffer);
- free (Pathname);
- if (OutPathname)
- {
- free (OutPathname);
- }
- return (0);
+Exit1:
+ free (Pathname);
+ return (Status);
}
diff --git a/source/tools/acpisrc/asremove.c b/source/tools/acpisrc/asremove.c
index c5d70804f9bb..0a521a5b8bfe 100644
--- a/source/tools/acpisrc/asremove.c
+++ b/source/tools/acpisrc/asremove.c
@@ -617,6 +617,7 @@ AsRemoveDebugMacros (
AsReplaceString ("return_VOID", "return", REPLACE_WHOLE_WORD, Buffer);
AsReplaceString ("return_PTR", "return", REPLACE_WHOLE_WORD, Buffer);
+ AsReplaceString ("return_STR", "return", REPLACE_WHOLE_WORD, Buffer);
AsReplaceString ("return_ACPI_STATUS", "return", REPLACE_WHOLE_WORD, Buffer);
AsReplaceString ("return_acpi_status", "return", REPLACE_WHOLE_WORD, Buffer);
AsReplaceString ("return_VALUE", "return", REPLACE_WHOLE_WORD, Buffer);