Commit 6661f434 authored by Andrew Talbot's avatar Andrew Talbot Committed by Alexandre Julliard

msi: Assign to structs instead of using memcpy.

parent d52f48fe
...@@ -232,7 +232,7 @@ static void read_properties_from_data( PROPVARIANT *prop, LPBYTE data, DWORD sz ...@@ -232,7 +232,7 @@ static void read_properties_from_data( PROPVARIANT *prop, LPBYTE data, DWORD sz
else else
ptr = &property; ptr = &property;
memcpy(&prop[ idofs[i].propid ], ptr, sizeof(PROPVARIANT)); prop[ idofs[i].propid ] = *ptr;
} }
} }
...@@ -387,7 +387,7 @@ static UINT save_summary_info( const MSISUMMARYINFO * si, IStream *stm ) ...@@ -387,7 +387,7 @@ static UINT save_summary_info( const MSISUMMARYINFO * si, IStream *stm )
/* write the format header */ /* write the format header */
sz = sizeof format_hdr; sz = sizeof format_hdr;
memcpy( &format_hdr.fmtid, &FMTID_SummaryInformation, sizeof (FMTID) ); format_hdr.fmtid = FMTID_SummaryInformation;
format_hdr.dwOffset = sizeof format_hdr + sizeof set_hdr; format_hdr.dwOffset = sizeof format_hdr + sizeof set_hdr;
r = IStream_Write( stm, &format_hdr, sz, &count ); r = IStream_Write( stm, &format_hdr, sz, &count );
if( FAILED(r) || count != sz ) if( FAILED(r) || count != sz )
...@@ -624,7 +624,7 @@ static UINT get_prop( MSIHANDLE handle, UINT uiProperty, UINT *puiDataType, ...@@ -624,7 +624,7 @@ static UINT get_prop( MSIHANDLE handle, UINT uiProperty, UINT *puiDataType,
break; break;
case VT_FILETIME: case VT_FILETIME:
if( pftValue ) if( pftValue )
memcpy(pftValue, &prop->u.filetime, sizeof (FILETIME) ); *pftValue = prop->u.filetime;
break; break;
case VT_EMPTY: case VT_EMPTY:
break; break;
...@@ -745,7 +745,7 @@ static UINT set_prop( MSIHANDLE handle, UINT uiProperty, UINT uiDataType, ...@@ -745,7 +745,7 @@ static UINT set_prop( MSIHANDLE handle, UINT uiProperty, UINT uiDataType,
prop->u.iVal = iValue; prop->u.iVal = iValue;
break; break;
case VT_FILETIME: case VT_FILETIME:
memcpy( &prop->u.filetime, pftValue, sizeof prop->u.filetime ); prop->u.filetime = *pftValue;
break; break;
case VT_LPSTR: case VT_LPSTR:
if( str->unicode ) if( str->unicode )
......
...@@ -923,7 +923,7 @@ static UINT get_defaulttablecolumns( LPCWSTR name, MSICOLUMNINFO *colinfo, UINT ...@@ -923,7 +923,7 @@ static UINT get_defaulttablecolumns( LPCWSTR name, MSICOLUMNINFO *colinfo, UINT
{ {
if (colinfo && (i < *sz) ) if (colinfo && (i < *sz) )
{ {
memcpy( &colinfo[i], &p[i], sizeof(MSICOLUMNINFO) ); colinfo[i] = p[i];
colinfo[i].tablename = strdupW( p[i].tablename ); colinfo[i].tablename = strdupW( p[i].tablename );
colinfo[i].colname = strdupW( p[i].colname ); colinfo[i].colname = strdupW( p[i].colname );
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment