localspl: Use BOOL type where appropriate

Frédéric Delanoy frederic.delanoy at gmail.com
Sat Nov 16 04:00:07 CST 2013


---
 dlls/localspl/provider.c | 21 +++++++++++----------
 1 file changed, 11 insertions(+), 10 deletions(-)

diff --git a/dlls/localspl/provider.c b/dlls/localspl/provider.c
index 87d84fd..212a099 100644
--- a/dlls/localspl/provider.c
+++ b/dlls/localspl/provider.c
@@ -216,7 +216,7 @@ static LPWSTR strdupW(LPCWSTR p)
 static BOOL apd_copyfile( WCHAR *pathname, WCHAR *file_part, apd_data_t *apd )
 {
     WCHAR *srcname;
-    DWORD res;
+    BOOL res;
 
     apd->src[apd->srclen] = '\0';
     apd->dst[apd->dstlen] = '\0';
@@ -239,7 +239,7 @@ static BOOL apd_copyfile( WCHAR *pathname, WCHAR *file_part, apd_data_t *apd )
 
     /* FIXME: handle APD_COPY_NEW_FILES */
     res = CopyFileW(srcname, apd->dst, FALSE);
-    TRACE("got %u with %u\n", res, GetLastError());
+    TRACE("got %d with %u\n", res, GetLastError());
 
     return (apd->lazy) ? TRUE : res;
 }
@@ -574,6 +574,7 @@ static monitor_t * monitor_loadui(monitor_t * pm)
     HANDLE  hXcv;
     DWORD   len;
     DWORD   res;
+    BOOL    rc;
 
     if (pm == NULL) return NULL;
     TRACE("(%p) => dllname: %s\n", pm, debugstr_w(pm->dllname));
@@ -589,9 +590,9 @@ static monitor_t * monitor_loadui(monitor_t * pm)
     /* query the userinterface-dllname from the Portmonitor */
     if ((pm->monitor) && (pm->monitor->pfnXcvDataPort)) {
         /* building (",XcvMonitor %s",pm->name) not needed yet */
-        res = pm->monitor->pfnXcvOpenPort(emptyW, SERVER_ACCESS_ADMINISTER, &hXcv);
-        TRACE("got %u with %p\n", res, hXcv);
-        if (res) {
+        rc = pm->monitor->pfnXcvOpenPort(emptyW, SERVER_ACCESS_ADMINISTER, &hXcv);
+        TRACE("got %d with %p\n", rc, hXcv);
+        if (rc) {
             res = pm->monitor->pfnXcvDataPort(hXcv, monitorUIW, NULL, 0, (BYTE *) buffer, sizeof(buffer), &len);
             TRACE("got %u with %s\n", res, debugstr_w(buffer));
             if (res == ERROR_SUCCESS) pui = monitor_load(NULL, buffer);
@@ -925,7 +926,7 @@ static DWORD get_ports_from_all_monitors(DWORD level, LPBYTE pPorts, DWORD cbBuf
     DWORD   pi_needed;
     DWORD   pi_index;
     DWORD   pi_returned;
-    DWORD   res;
+    BOOL    res;
     DWORD   outindex = 0;
     DWORD   needed;
     DWORD   numentries;
@@ -1576,7 +1577,7 @@ static BOOL WINAPI fpAddPort(LPWSTR pName, HWND hWnd, LPWSTR pMonitorName)
     monitor_t * pm;
     monitor_t * pui;
     LONG        lres;
-    DWORD       res;
+    BOOL        res;
 
     TRACE("(%s, %p, %s)\n", debugstr_w(pName), hWnd, debugstr_w(pMonitorName));
 
@@ -1643,7 +1644,7 @@ static BOOL WINAPI fpAddPortEx(LPWSTR pName, DWORD level, LPBYTE pBuffer, LPWSTR
     PORT_INFO_2W * pi2;
     monitor_t * pm;
     DWORD lres;
-    DWORD res;
+    BOOL res;
 
     pi2 = (PORT_INFO_2W *) pBuffer;
 
@@ -1767,7 +1768,7 @@ static BOOL WINAPI fpConfigurePort(LPWSTR pName, HWND hWnd, LPWSTR pPortName)
     monitor_t * pm;
     monitor_t * pui;
     LONG        lres;
-    DWORD       res;
+    BOOL        res;
 
     TRACE("(%s, %p, %s)\n", debugstr_w(pName), hWnd, debugstr_w(pPortName));
 
@@ -1897,7 +1898,7 @@ static BOOL WINAPI fpDeletePort(LPWSTR pName, HWND hWnd, LPWSTR pPortName)
     monitor_t * pm;
     monitor_t * pui;
     LONG        lres;
-    DWORD       res;
+    BOOL        res;
 
     TRACE("(%s, %p, %s)\n", debugstr_w(pName), hWnd, debugstr_w(pPortName));
 
-- 
1.8.4.2




More information about the wine-patches mailing list