mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-01-28 22:04:43 -08:00
d3dxof-Cleanup: Update patchset to use assignment instead of memcpy.
This commit is contained in:
parent
20e97e50b3
commit
3c1f26970c
@ -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;
|
||||
}
|
@ -1556,9 +1556,9 @@ fi
|
||||
# | * dlls/d3dxof/d3dxof.c
|
||||
# |
|
||||
if test "$enable_d3dxof_Cleanup" -eq 1; then
|
||||
patch_apply d3dxof-Cleanup/0001-d3dxof-Use-sizeof-GUID-instead-of-hardcoding-the-val.patch
|
||||
patch_apply d3dxof-Cleanup/0001-d3dxof-Use-straight-assignement-instead-of-using-mem.patch
|
||||
(
|
||||
echo '+ { "Christian Costa", "d3dxof: Use sizeof(GUID) instead of hardcoding the value.", 1 },';
|
||||
echo '+ { "Christian Costa", "d3dxof: Use straight assignement instead of using memcpy with hardcoded size.", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user