setupapi: Cast-qual warning fix

Andrew Talbot Andrew.Talbot at talbotville.com
Mon Nov 13 15:09:21 CST 2006


Changelog:
    setupapi: Cast-qual warning fix.

diff -urN a/dlls/setupapi/virtcopy.c b/dlls/setupapi/virtcopy.c
--- a/dlls/setupapi/virtcopy.c	2006-10-20 18:08:05.000000000 +0100
+++ b/dlls/setupapi/virtcopy.c	2006-11-13 21:01:32.000000000 +0000
@@ -91,6 +91,7 @@
     VHSTR n;
     VHSTR index = 0xffff;
     HANDLE heap;
+    LPSTR str;
 
     TRACE("add string '%s'\n", lpszName);
     /* search whether string already inserted */
@@ -137,8 +138,9 @@
     if (!vhstrlist[index])
 	vhstrlist[index] = HeapAlloc(heap, HEAP_ZERO_MEMORY, sizeof(VHSTR_STRUCT));
     vhstrlist[index]->refcount = 1;
-    vhstrlist[index]->pStr = HeapAlloc(heap, 0, strlen(lpszName)+1);
-    strcpy((LPSTR)vhstrlist[index]->pStr, lpszName);
+    str = HeapAlloc(heap, 0, strlen(lpszName)+1);
+    strcpy(str, lpszName);
+    vhstrlist[index]->pStr = str;
     return index;
 }
 



More information about the wine-patches mailing list