diff options
author | Jung-uk Kim <jkim@FreeBSD.org> | 2012-10-19 18:47:57 +0000 |
---|---|---|
committer | Jung-uk Kim <jkim@FreeBSD.org> | 2012-10-19 18:47:57 +0000 |
commit | 31aa864e8c068201d58aad3a8f82ddb51df11015 (patch) | |
tree | 5e268c18ae0fa3ec73e13e2af60a3be57d8393ec /source/components/resources/rscalc.c | |
parent | ebef5c959a0ea58fa05c4a5a80bb93104780bf87 (diff) |
Notes
Diffstat (limited to 'source/components/resources/rscalc.c')
-rw-r--r-- | source/components/resources/rscalc.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/source/components/resources/rscalc.c b/source/components/resources/rscalc.c index 845ed69c7deeb..12af85ea30ced 100644 --- a/source/components/resources/rscalc.c +++ b/source/components/resources/rscalc.c @@ -482,6 +482,16 @@ AcpiRsGetListLength ( * Get the number of vendor data bytes */ ExtraStructBytes = ResourceLength; + + /* + * There is already one byte included in the minimum + * descriptor size. If there are extra struct bytes, + * subtract one from the count. + */ + if (ExtraStructBytes) + { + ExtraStructBytes--; + } break; @@ -626,7 +636,7 @@ AcpiRsGetPciRoutingTableLength ( /* * Calculate the size of the return buffer. * The base size is the number of elements * the sizes of the - * structures. Additional space for the strings is added below. + * structures. Additional space for the strings is added below. * The minus one is to subtract the size of the UINT8 Source[1] * member because it is added below. * |