cleanup: replace allocate_value and memcpy with value_from_contents

2013-08-29  Sanimir Agovic  <sanimir.agovic@intel.com>

	* value.c (value_from_contents_and_address): Replace allocate_value and
	memcpy with value_from_contents.
This commit is contained in:
Sanimir Agovic
2013-08-29 12:21:29 +00:00
parent 5c98a14e1e
commit 314c7de970
2 changed files with 6 additions and 4 deletions

View File

@@ -1,3 +1,8 @@
2013-08-29 Sanimir Agovic <sanimir.agovic@intel.com>
* value.c (value_from_contents_and_address): Replace allocate_value and
memcpy with value_from_contents.
2013-08-29 Phil Muldoon <pmuldoon@redhat.com>
* python/py-framefilter.c (py_print_frame): Remove usage of

View File

@@ -3188,10 +3188,7 @@ value_from_contents_and_address (struct type *type,
if (valaddr == NULL)
v = allocate_value_lazy (type);
else
{
v = allocate_value (type);
memcpy (value_contents_raw (v), valaddr, TYPE_LENGTH (type));
}
v = value_from_contents (type, valaddr);
set_value_address (v, address);
VALUE_LVAL (v) = lval_memory;
return v;