Skip to content

Commit

Permalink
Clean up exception code class checks
Browse files Browse the repository at this point in the history
With the exception code class check macros fixed in the previous commit,
let us now use those to simplify exception class checks across acpica.

Signed-off-by: Maximilian Luz <luzmaximilian@gmail.com>
  • Loading branch information
qzed committed Oct 18, 2020
1 parent 1a3a549 commit 5a8390f
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion source/components/debugger/dbobject.c
Expand Up @@ -201,7 +201,7 @@ AcpiDbDumpMethodInfo (

/* Ignore control codes, they are not errors */

if ((Status & AE_CODE_MASK) == AE_CODE_CONTROL)
if (ACPI_CNTL_EXCEPTION (Status))
{
return;
}
Expand Down
2 changes: 1 addition & 1 deletion source/components/dispatcher/dsdebug.c
Expand Up @@ -254,7 +254,7 @@ AcpiDsDumpMethodStack (

/* Ignore control codes, they are not errors */

if ((Status & AE_CODE_MASK) == AE_CODE_CONTROL)
if (ACPI_CNTL_EXCEPTION (Status))
{
return_VOID;
}
Expand Down
3 changes: 1 addition & 2 deletions source/components/parser/psloop.c
Expand Up @@ -410,8 +410,7 @@ AcpiPsParseLoop (
*/
WalkState->Op = NULL;
Status = AcpiDsGetPredicateValue (WalkState, ACPI_TO_POINTER (TRUE));
if (ACPI_FAILURE (Status) &&
((Status & AE_CODE_MASK) != AE_CODE_CONTROL))
if (ACPI_FAILURE (Status) && !ACPI_CNTL_EXCEPTION (Status))
{
if (Status == AE_AML_NO_RETURN_VALUE)
{
Expand Down
2 changes: 1 addition & 1 deletion source/components/parser/psparse.c
Expand Up @@ -533,7 +533,7 @@ AcpiPsNextParseState (
default:

Status = CallbackStatus;
if ((CallbackStatus & AE_CODE_MASK) == AE_CODE_CONTROL)
if (ACPI_CNTL_EXCEPTION (CallbackStatus))
{
Status = AE_OK;
}
Expand Down

0 comments on commit 5a8390f

Please sign in to comment.