summaryrefslogtreecommitdiffstats
path: root/win/tclWinPipe.c
diff options
context:
space:
mode:
Diffstat (limited to 'win/tclWinPipe.c')
-rw-r--r--win/tclWinPipe.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/win/tclWinPipe.c b/win/tclWinPipe.c
index 84e6ab0..bf78aef 100644
--- a/win/tclWinPipe.c
+++ b/win/tclWinPipe.c
@@ -1823,7 +1823,7 @@ TclpCreateCommandChannel(
* unique, in case channels share handles (stdin/stdout).
*/
- sprintf(channelName, "file%" TCL_Z_MODIFIER "x", (size_t) infoPtr);
+ snprintf(channelName, sizeof(channelName), "file%" TCL_Z_MODIFIER "x", (size_t) infoPtr);
infoPtr->channel = Tcl_CreateChannel(&pipeChannelType, channelName,
infoPtr, infoPtr->validMask);
@@ -2705,7 +2705,7 @@ TclWinAddProcess(
void *hProcess, /* Handle to process */
size_t id) /* Global process identifier */
{
- ProcInfo *procPtr = (ProcInfo*)Tcl_Alloc(sizeof(ProcInfo));
+ ProcInfo *procPtr = (ProcInfo *)Tcl_Alloc(sizeof(ProcInfo));
PipeInit();
@@ -2805,7 +2805,7 @@ WaitForRead(
* or not. */
{
DWORD timeout, count;
- HANDLE *handle = (HANDLE *)((WinFile *) infoPtr->readFile)->handle;
+ HANDLE handle = ((WinFile *) infoPtr->readFile)->handle;
while (1) {
/*
@@ -3227,7 +3227,7 @@ TclpOpenTemporaryFile(
do {
char number[TCL_INTEGER_SPACE + 4];
- sprintf(number, "%d.TMP", counter);
+ snprintf(number, sizeof(number), "%d.TMP", counter);
counter = (unsigned short) (counter + 1);
Tcl_DStringInit(&buf);
Tcl_UtfToWCharDString(number, strlen(number), &buf);