summaryrefslogtreecommitdiffstats
path: root/generic/tclPipe.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tclPipe.c')
-rw-r--r--generic/tclPipe.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/generic/tclPipe.c b/generic/tclPipe.c
index 1f5e4f1..137b415 100644
--- a/generic/tclPipe.c
+++ b/generic/tclPipe.c
@@ -433,7 +433,7 @@ TclCreatePipeline(
* pids of child processes. */
size_t numPids; /* Actual number of processes that exist at
* *pidPtr right now. */
- int cmdCount; /* Count of number of distinct commands found
+ size_t cmdCount; /* Count of number of distinct commands found
* in argc/argv. */
const char *inputLiteral = NULL;
/* If non-null, then this points to a string
@@ -1029,7 +1029,7 @@ Tcl_OpenCommandChannel(
TclFile *inPipePtr, *outPipePtr, *errFilePtr;
TclFile inPipe, outPipe, errFile;
size_t numPids;
- Tcl_Pid *pidPtr;
+ Tcl_Pid *pidPtr = NULL;
Tcl_Channel channel;
inPipe = outPipe = errFile = NULL;
@@ -1041,7 +1041,7 @@ Tcl_OpenCommandChannel(
numPids = TclCreatePipeline(interp, argc, argv, &pidPtr, inPipePtr,
outPipePtr, errFilePtr);
- if (numPids < 0) {
+ if (numPids == TCL_INDEX_NONE) {
goto error;
}
@@ -1081,7 +1081,7 @@ Tcl_OpenCommandChannel(
return channel;
error:
- if (numPids > 0) {
+ if (pidPtr) {
Tcl_DetachPids(numPids, pidPtr);
Tcl_Free(pidPtr);
}