From dbe7718e2b231aed539079b20594094c75461262 Mon Sep 17 00:00:00 2001 From: Andrew Talbot Date: Tue, 18 Mar 2008 21:42:20 +0000 Subject: [PATCH] urlmon: Assign to structs instead of using memcpy. --- dlls/urlmon/binding.c | 4 ++-- dlls/urlmon/urlmon_main.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/urlmon/binding.c b/dlls/urlmon/binding.c index c647230d62..47b521c68b 100644 --- a/dlls/urlmon/binding.c +++ b/dlls/urlmon/binding.c @@ -1083,7 +1083,7 @@ static HRESULT WINAPI InternetProtocolSink_Switch(IInternetProtocolSink *iface, TRACE("(%p)->(%p)\n", This, pProtocolData); task = heap_alloc(sizeof(switch_task_t)); - memcpy(&task->data, pProtocolData, sizeof(PROTOCOLDATA)); + task->data = *pProtocolData; push_task(This, &task->header, switch_proc); @@ -1382,7 +1382,7 @@ static HRESULT WINAPI InternetBindInfo_GetBindInfo(IInternetBindInfo *iface, *grfBINDF = This->bindf; - memcpy(pbindinfo, &This->bindinfo, sizeof(BINDINFO)); + *pbindinfo = This->bindinfo; if(pbindinfo->szExtraInfo || pbindinfo->szCustomVerb) FIXME("copy strings\n"); diff --git a/dlls/urlmon/urlmon_main.c b/dlls/urlmon/urlmon_main.c index 7d5606282f..bc3de934b3 100644 --- a/dlls/urlmon/urlmon_main.c +++ b/dlls/urlmon/urlmon_main.c @@ -398,7 +398,7 @@ HRESULT WINAPI CopyStgMedium(const STGMEDIUM *src, STGMEDIUM *dst) if(!src || !dst) return E_POINTER; - memcpy(dst, src, sizeof(STGMEDIUM)); + *dst = *src; switch(dst->tymed) { case TYMED_NULL: