You've already forked wine-staging
mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-09-12 18:50:20 -07:00
d3dxof-Cleanup: Update patchset to use assignment instead of memcpy.
This commit is contained in:
@@ -1,14 +1,15 @@
|
||||
From 60d8abcd74abb34f8922c7b33742d73c47773ddf Mon Sep 17 00:00:00 2001
|
||||
From d18752b72603e91c7bbbbfa623c83f3d13112ca1 Mon Sep 17 00:00:00 2001
|
||||
From: Christian Costa <titan.costa@gmail.com>
|
||||
Date: Mon, 22 Oct 2012 21:00:52 +0200
|
||||
Subject: d3dxof: Use sizeof(GUID) instead of hardcoding the value.
|
||||
Subject: d3dxof: Use straight assignement instead of using memcpy with
|
||||
hardcoded size.
|
||||
|
||||
---
|
||||
dlls/d3dxof/d3dxof.c | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3dxof/d3dxof.c b/dlls/d3dxof/d3dxof.c
|
||||
index 88647cf..d612109 100644
|
||||
index 88647cf..8888d8b 100644
|
||||
--- a/dlls/d3dxof/d3dxof.c
|
||||
+++ b/dlls/d3dxof/d3dxof.c
|
||||
@@ -619,7 +619,7 @@ static HRESULT WINAPI IDirectXFileDataImpl_GetId(IDirectXFileData* iface, LPGUID
|
||||
@@ -16,7 +17,7 @@ index 88647cf..d612109 100644
|
||||
return DXFILEERR_BADVALUE;
|
||||
|
||||
- memcpy(pGuid, &This->pobj->class_id, 16);
|
||||
+ memcpy(pGuid, &This->pobj->class_id, sizeof(GUID));
|
||||
+ *pGuid = This->pobj->class_id;
|
||||
|
||||
return DXFILE_OK;
|
||||
}
|
||||
@@ -25,7 +26,7 @@ index 88647cf..d612109 100644
|
||||
return DXFILEERR_BADVALUE;
|
||||
|
||||
- memcpy(&guid, &This->pobj->type, 16);
|
||||
+ memcpy(&guid, &This->pobj->type, sizeof(GUID));
|
||||
+ guid = This->pobj->type;
|
||||
*pguid = &guid;
|
||||
|
||||
return DXFILE_OK;
|
||||
@@ -34,7 +35,7 @@ index 88647cf..d612109 100644
|
||||
return DXFILEERR_BADVALUE;
|
||||
|
||||
- memcpy(pGuid, &This->ptarget->class_id, 16);
|
||||
+ memcpy(pGuid, &This->ptarget->class_id, sizeof(GUID));
|
||||
+ *pGuid = This->ptarget->class_id;
|
||||
|
||||
return DXFILE_OK;
|
||||
}
|
||||
Reference in New Issue
Block a user