acpi_ut_copy_simple_object (	union acpi_operand_object       *source_desc,	union acpi_operand_object       *dest_desc){	u16                             reference_count;	union acpi_operand_object       *next_object;	/* Save fields from destination that we don't want to overwrite */	reference_count = dest_desc->common.reference_count;	next_object = dest_desc->common.next_object;	/* Copy the entire source object over the destination object*/	ACPI_MEMCPY ((char *) dest_desc, (char *) source_desc,			  sizeof (union acpi_operand_object));	/* Restore the saved fields */	dest_desc->common.reference_count = reference_count;	dest_desc->common.next_object = next_object;	/* Handle the objects with extra data */	switch (ACPI_GET_OBJECT_TYPE (dest_desc)) {	case ACPI_TYPE_BUFFER:		dest_desc->buffer.node = NULL;		dest_desc->common.flags = source_desc->common.flags;		/*		 * Allocate and copy the actual buffer if and only if:		 * 1) There is a valid buffer pointer		 * 2) The buffer is not static (not in an ACPI table) (in this case,		 *    the actual pointer was already copied above)		 */		if ((source_desc->buffer.pointer) &&			(!(source_desc->common.flags & AOPOBJ_STATIC_POINTER))) {			dest_desc->buffer.pointer = NULL;			/* Create an actual buffer only if length > 0 */			if (source_desc->buffer.length) {				dest_desc->buffer.pointer =					ACPI_MEM_ALLOCATE (source_desc->buffer.length);				if (!dest_desc->buffer.pointer) {					return (AE_NO_MEMORY);				}				/* Copy the actual buffer data */				ACPI_MEMCPY (dest_desc->buffer.pointer,						source_desc->buffer.pointer,						source_desc->buffer.length);			}		}		break;	case ACPI_TYPE_STRING:		/*		 * Allocate and copy the actual string if and only if:		 * 1) There is a valid string pointer		 * 2) The string is not static (not in an ACPI table) (in this case,		 *    the actual pointer was already copied above)		 */		if ((source_desc->string.pointer) &&			(!(source_desc->common.flags & AOPOBJ_STATIC_POINTER))) {			dest_desc->string.pointer =				ACPI_MEM_ALLOCATE ((acpi_size) source_desc->string.length + 1);			if (!dest_desc->string.pointer) {				return (AE_NO_MEMORY);			}			ACPI_MEMCPY (dest_desc->string.pointer, source_desc->string.pointer,					  (acpi_size) source_desc->string.length + 1);		}		break;	case ACPI_TYPE_LOCAL_REFERENCE:		/*		 * We copied the reference object, so we now must add a reference		 * to the object pointed to by the reference		 */		acpi_ut_add_reference (source_desc->reference.object);		break;	default:		/* Nothing to do for other simple objects */		break;	}	return (AE_OK);}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/6f42ccf2fc50ecee8ea170040627f268430c1648/utcopy.c/clean/drivers/acpi/utilities/utcopy.c