diff options
Diffstat (limited to 'win')
-rw-r--r-- | win/tclWinDde.c | 12 | ||||
-rw-r--r-- | win/tclWinFCmd.c | 2 | ||||
-rw-r--r-- | win/tclWinTest.c | 7 |
3 files changed, 10 insertions, 11 deletions
diff --git a/win/tclWinDde.c b/win/tclWinDde.c index f16625c..f5882c6 100644 --- a/win/tclWinDde.c +++ b/win/tclWinDde.c @@ -844,8 +844,8 @@ DdeServicesOnAck(HWND hwnd, WPARAM wParam, LPARAM lParam) es = (ddeEnumServices *)GetWindowLong(hwnd, GWL_USERDATA); #endif - if ((es->service == (ATOM)NULL || es->service == service) - && (es->topic == (ATOM)NULL || es->topic == topic)) { + if ((es->service == (ATOM)0 || es->service == service) + && (es->topic == (ATOM)0 || es->topic == topic)) { Tcl_Obj *matchPtr = Tcl_NewListObj(0, NULL); GlobalGetAtomName(service, sz, 255); @@ -890,9 +890,9 @@ DdeGetServicesList(Tcl_Interp *interp, char *serviceName, char *topicName) es.interp = interp; es.result = TCL_OK; es.service = (serviceName == NULL) - ? (ATOM)NULL : GlobalAddAtom(serviceName); + ? (ATOM)0 : GlobalAddAtom(serviceName); es.topic = (topicName == NULL) - ? (ATOM)NULL : GlobalAddAtom(topicName); + ? (ATOM)0 : GlobalAddAtom(topicName); Tcl_ResetResult(interp); /* our list is to be appended to result. */ DdeCreateClient(&es); @@ -900,9 +900,9 @@ DdeGetServicesList(Tcl_Interp *interp, char *serviceName, char *topicName) if (IsWindow(es.hwnd)) DestroyWindow(es.hwnd); - if (es.service != (ATOM)NULL) + if (es.service != (ATOM)0) GlobalDeleteAtom(es.service); - if (es.topic != (ATOM)NULL) + if (es.topic != (ATOM)0) GlobalDeleteAtom(es.topic); return es.result; } diff --git a/win/tclWinFCmd.c b/win/tclWinFCmd.c index 32e1656..e0861f2 100644 --- a/win/tclWinFCmd.c +++ b/win/tclWinFCmd.c @@ -1199,7 +1199,7 @@ TraverseWinTree( { DWORD sourceAttr; TCHAR *nativeSource, *nativeTarget, *nativeErrfile; - int result, found, sourceLen, targetLen, oldSourceLen, oldTargetLen; + int result, found, sourceLen, targetLen = 0, oldSourceLen, oldTargetLen; HANDLE handle; WIN32_FIND_DATAT data; diff --git a/win/tclWinTest.c b/win/tclWinTest.c index 186d308..0ddd76b 100644 --- a/win/tclWinTest.c +++ b/win/tclWinTest.c @@ -538,7 +538,7 @@ TestplatformChmod(CONST char *nativePath, int pmode) | FILE_ADD_SUBDIRECTORY | FILE_WRITE_EA | FILE_APPEND_DATA | FILE_WRITE_DATA | DELETE; - BYTE *secDesc = 0; + PSECURITY_DESCRIPTOR secDesc = 0; DWORD secDescLen; const BOOL set_readOnly = !(pmode & 0222); @@ -670,9 +670,8 @@ TestplatformChmod(CONST char *nativePath, int pmode) if (!getFileSecurityProc(nativePath, infoBits, NULL, 0, &secDescLen)) { if (GetLastError() == ERROR_INSUFFICIENT_BUFFER) { DWORD secDescLen2 = 0; - secDesc = (BYTE *) ckalloc(secDescLen); - if (!getFileSecurityProc(nativePath, infoBits, - (PSECURITY_DESCRIPTOR)secDesc, + secDesc = (PSECURITY_DESCRIPTOR) ckalloc(secDescLen); + if (!getFileSecurityProc(nativePath, infoBits, secDesc, secDescLen, &secDescLen2) || (secDescLen < secDescLen2)) { goto done; |