regedit: Remove superfluous pointer casts.

Michael Stefaniuc mstefani at redhat.de
Thu Jan 15 02:47:14 CST 2009


---
 programs/regedit/listview.c |    4 ++--
 programs/regedit/treeview.c |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/programs/regedit/listview.c b/programs/regedit/listview.c
index 65efecb..fb7688f 100644
--- a/programs/regedit/listview.c
+++ b/programs/regedit/listview.c
@@ -179,7 +179,7 @@ static void AddEntryToList(HWND hwndLV, LPWSTR Name, DWORD dwValType,
             break;
         case REG_BINARY: {
                 unsigned int i;
-                LPBYTE pData = (LPBYTE)ValBuf;
+                LPBYTE pData = ValBuf;
                 LPWSTR strBinary = HeapAlloc(GetProcessHeap(), 0, dwCount * sizeof(WCHAR) * 3 + sizeof(WCHAR));
                 WCHAR format[] = {'%','0','2','X',' ',0};
                 for (i = 0; i < dwCount; i++)
@@ -476,7 +476,7 @@ HWND CreateListView(HWND hwndParent, UINT id)
     hwndLV = CreateWindowExW(WS_EX_CLIENTEDGE, WC_LISTVIEWW, ListView,
                             WS_VISIBLE | WS_CHILD | WS_TABSTOP | LVS_REPORT | LVS_EDITLABELS,
                             0, 0, rcClient.right, rcClient.bottom,
-                            hwndParent, (HMENU)ULongToHandle(id), hInst, NULL);
+                            hwndParent, ULongToHandle(id), hInst, NULL);
     if (!hwndLV) return NULL;
     SendMessageW(hwndLV, LVM_SETUNICODEFORMAT, TRUE, 0);
     SendMessageW(hwndLV, LVM_SETEXTENDEDLISTVIEWSTYLE, 0, LVS_EX_FULLROWSELECT);
diff --git a/programs/regedit/treeview.c b/programs/regedit/treeview.c
index 20d1b76..e48eb5b 100644
--- a/programs/regedit/treeview.c
+++ b/programs/regedit/treeview.c
@@ -672,7 +672,7 @@ HWND CreateTreeView(HWND hwndParent, LPWSTR pHostName, UINT id)
     hwndTV = CreateWindowExW(WS_EX_CLIENTEDGE, WC_TREEVIEWW, TreeView,
                             WS_VISIBLE | WS_CHILD | WS_TABSTOP | TVS_HASLINES | TVS_HASBUTTONS | TVS_LINESATROOT,
                             0, 0, rcClient.right, rcClient.bottom,
-                            hwndParent, (HMENU)ULongToHandle(id), hInst, NULL);
+                            hwndParent, ULongToHandle(id), hInst, NULL);
     SendMessageW(hwndTV, TVM_SETUNICODEFORMAT, TRUE, 0);
     /* Initialize the image list, and add items to the control.  */
     if (!InitTreeViewImageLists(hwndTV) || !InitTreeViewItems(hwndTV, pHostName)) {
-- 
1.6.0.6
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20090115/37c217f2/attachment-0001.pgp 


More information about the wine-patches mailing list