diff options
author | jkim <jkim@FreeBSD.org> | 2013-04-19 23:49:34 +0000 |
---|---|---|
committer | jkim <jkim@FreeBSD.org> | 2013-04-19 23:49:34 +0000 |
commit | 1d7102aa1b8c84f1186ae05e3678f2cac71c0f5c (patch) | |
tree | 5f5a3414edb3b26bbd9583d16c6368e24578edff /sys/contrib/dev/acpica/components/utilities/utpredef.c | |
parent | 91a43667738a5b60b71f7b124b2c9686c2338341 (diff) | |
parent | 2827e383d552774c11bb806510c3468678d07994 (diff) | |
download | FreeBSD-src-1d7102aa1b8c84f1186ae05e3678f2cac71c0f5c.zip FreeBSD-src-1d7102aa1b8c84f1186ae05e3678f2cac71c0f5c.tar.gz |
Merge ACPICA 20130418.
Diffstat (limited to 'sys/contrib/dev/acpica/components/utilities/utpredef.c')
-rw-r--r-- | sys/contrib/dev/acpica/components/utilities/utpredef.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/sys/contrib/dev/acpica/components/utilities/utpredef.c b/sys/contrib/dev/acpica/components/utilities/utpredef.c index 236d243..8864120 100644 --- a/sys/contrib/dev/acpica/components/utilities/utpredef.c +++ b/sys/contrib/dev/acpica/components/utilities/utpredef.c @@ -166,6 +166,12 @@ AcpiUtGetExpectedReturnTypes ( UINT32 j; + if (!ExpectedBtypes) + { + ACPI_STRCPY (Buffer, "NONE"); + return; + } + j = 1; Buffer[0] = 0; ThisRtype = ACPI_RTYPE_INTEGER; @@ -373,9 +379,7 @@ AcpiUtGetArgumentTypes ( /* First field in the types list is the count of args to follow */ - ArgCount = (ArgumentTypes & METHOD_ARG_MASK); - ArgumentTypes >>= METHOD_ARG_BIT_WIDTH; - + ArgCount = METHOD_GET_ARG_COUNT (ArgumentTypes); if (ArgCount > METHOD_PREDEF_ARGS_MAX) { printf ("**** Invalid argument count (%u) " @@ -387,7 +391,8 @@ AcpiUtGetArgumentTypes ( for (i = 0; i < ArgCount; i++) { - ThisArgumentType = (ArgumentTypes & METHOD_ARG_MASK); + ThisArgumentType = METHOD_GET_NEXT_TYPE (ArgumentTypes); + if (!ThisArgumentType || (ThisArgumentType > METHOD_MAX_ARG_TYPE)) { printf ("**** Invalid argument type (%u) " @@ -396,10 +401,6 @@ AcpiUtGetArgumentTypes ( } strcat (Buffer, UtExternalTypeNames[ThisArgumentType] + SubIndex); - - /* Shift to next argument type field */ - - ArgumentTypes >>= METHOD_ARG_BIT_WIDTH; SubIndex = 0; } |