/* It is possible to determine the size of an AML NameString/path just by sight reading it. So no overflow can occur. */
CONST CHAR8* EFIAPI AmlGetFirstNameSeg(IN CONST CHAR8 *AmlPath, IN UINT32 Root, IN UINT32 ParentPrefix)
/* It is possible to determine the size of an AML NameString/path just by sight reading it. So no overflow can occur. */
CONST CHAR8* EFIAPI AmlGetFirstNameSeg(IN CONST CHAR8 *AmlPath, IN UINT32 Root, IN UINT32 ParentPrefix)
{
  if (AmlPath == NULL) {
    ASSERT (0);
    return NULL;
  }
  AmlPath += Root;
  AmlPath += ParentPrefix;
  AmlPath += ((*AmlPath == AML_MULTI_NAME_PREFIX) ? 2
               : (*AmlPath == AML_DUAL_NAME_PREFIX) ? 1 : 0);
  return AmlPath;
}