diff --git a/generic/tclClockFmt.c b/generic/tclClockFmt.c index 392574cbef0..11956cc176a 100644 --- a/generic/tclClockFmt.c +++ b/generic/tclClockFmt.c @@ -2303,7 +2303,7 @@ ClockGetOrParseScanFormat( wordTok->tokWord.start = p; wordTok->map = &ScnWordTokenMap; } - + do { if (isspace(UCHAR(*p))) { fss->scnSpaceCount++; diff --git a/win/tclWinConsole.c b/win/tclWinConsole.c index c7e12aeaefe..d34104ecb89 100644 --- a/win/tclWinConsole.c +++ b/win/tclWinConsole.c @@ -341,7 +341,7 @@ RingBufferInit( if (capacity <= 0 || capacity > TCL_SIZE_MAX) { Tcl_Panic("Internal error: invalid ring buffer capacity requested."); } - ringPtr->bufPtr = (char *) ckalloc(capacity); + ringPtr->bufPtr = (char *)ckalloc(capacity); ringPtr->capacity = capacity; ringPtr->start = 0; ringPtr->length = 0; @@ -2006,8 +2006,7 @@ AllocateConsoleHandleInfo( ConsoleHandleInfo *handleInfoPtr; DWORD consoleMode; - handleInfoPtr = (ConsoleHandleInfo *) ckalloc(sizeof(*handleInfoPtr)); - memset(handleInfoPtr, 0, sizeof(*handleInfoPtr)); + handleInfoPtr = (ConsoleHandleInfo *)ckalloc(sizeof(*handleInfoPtr)); memset(handleInfoPtr, 0, sizeof(*handleInfoPtr)); handleInfoPtr->console = consoleHandle; InitializeSRWLock(&handleInfoPtr->lock); diff --git a/win/tclWinSock.c b/win/tclWinSock.c index e427c39ed77..d7c137ab9bc 100644 --- a/win/tclWinSock.c +++ b/win/tclWinSock.c @@ -403,7 +403,7 @@ InitializeHostName( *encodingPtr = Tcl_GetEncoding(NULL, "utf-8"); *lengthPtr = Tcl_DStringLength(&ds); - *valuePtr = (char *) ckalloc(*lengthPtr + 1); + *valuePtr = (char *)ckalloc(*lengthPtr + 1); memcpy(*valuePtr, Tcl_DStringValue(&ds), *lengthPtr + 1); Tcl_DStringFree(&ds); } @@ -2572,7 +2572,7 @@ SocketCheckProc( statePtr->watchEvents | FD_CONNECT | FD_ACCEPT) && !GOT_BITS(statePtr->flags, SOCKET_PENDING)) { SET_BITS(statePtr->flags, SOCKET_PENDING); - evPtr = (SocketEvent *) ckalloc(sizeof(SocketEvent)); + evPtr = (SocketEvent *)ckalloc(sizeof(SocketEvent)); evPtr->header.proc = SocketEventProc; evPtr->socket = statePtr->sockets->fd; Tcl_QueueEvent((Tcl_Event *) evPtr, TCL_QUEUE_TAIL); @@ -2847,7 +2847,7 @@ AddSocketInfoFd( * Add the first FD. */ - statePtr->sockets = (TcpFdList *) ckalloc(sizeof(TcpFdList)); + statePtr->sockets = (TcpFdList *)ckalloc(sizeof(TcpFdList)); fds = statePtr->sockets; } else { /* @@ -2858,7 +2858,7 @@ AddSocketInfoFd( fds = fds->next; } - fds->next = (TcpFdList *) ckalloc(sizeof(TcpFdList)); + fds->next = (TcpFdList *)ckalloc(sizeof(TcpFdList)); fds = fds->next; } @@ -2891,7 +2891,7 @@ static TcpState * NewSocketInfo( SOCKET socket) { - TcpState *statePtr = (TcpState *) ckalloc(sizeof(TcpState)); + TcpState *statePtr = (TcpState *)ckalloc(sizeof(TcpState)); memset(statePtr, 0, sizeof(TcpState)); diff --git a/win/tclWinTest.c b/win/tclWinTest.c index ec12f67eedb..44ff0384076 100644 --- a/win/tclWinTest.c +++ b/win/tclWinTest.c @@ -485,7 +485,7 @@ TestplatformChmod( goto done; } aceEntry[nSids].sidLen = GetLengthSid(pTokenUser->User.Sid); - aceEntry[nSids].pSid = ckalloc(aceEntry[nSids].sidLen); + aceEntry[nSids].pSid = (PSID)ckalloc(aceEntry[nSids].sidLen); if (!CopySid(aceEntry[nSids].sidLen, aceEntry[nSids].pSid, pTokenUser->User.Sid)) { ckfree(aceEntry[nSids].pSid); /* Since we have not ++'ed nSids */ @@ -527,7 +527,7 @@ TestplatformChmod( goto done; } aceEntry[nSids].sidLen = GetLengthSid(pTokenGroup->PrimaryGroup); - aceEntry[nSids].pSid = ckalloc(aceEntry[nSids].sidLen); + aceEntry[nSids].pSid = (PSID)ckalloc(aceEntry[nSids].sidLen); if (!CopySid(aceEntry[nSids].sidLen, aceEntry[nSids].pSid, pTokenGroup->PrimaryGroup)) { ckfree(pTokenGroup); ckfree(aceEntry[nSids].pSid); /* Since we have not ++'ed nSids */ @@ -557,7 +557,7 @@ TestplatformChmod( goto done; } aceEntry[nSids].sidLen = GetLengthSid(pWorldSid); - aceEntry[nSids].pSid = ckalloc(aceEntry[nSids].sidLen); + aceEntry[nSids].pSid = (PSID)ckalloc(aceEntry[nSids].sidLen); if (!CopySid(aceEntry[nSids].sidLen, aceEntry[nSids].pSid, pWorldSid)) { LocalFree(pWorldSid); ckfree(aceEntry[nSids].pSid); /* Since we have not ++'ed nSids */