summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrjohnson <rjohnson>1998-08-10 17:18:18 (GMT)
committerrjohnson <rjohnson>1998-08-10 17:18:18 (GMT)
commit1e3d989cf1bf3698c3eed3b0cda3aa8f4dcdb6c8 (patch)
tree96ca7940b24f0501624eab0a731c782d7a077a2e
parent63b1baf8ac692eba3e6c8dd7dd3505a7024f1eff (diff)
downloadtcl-1e3d989cf1bf3698c3eed3b0cda3aa8f4dcdb6c8.zip
tcl-1e3d989cf1bf3698c3eed3b0cda3aa8f4dcdb6c8.tar.gz
tcl-1e3d989cf1bf3698c3eed3b0cda3aa8f4dcdb6c8.tar.bz2
fixed style problems
-rw-r--r--generic/tclBasic.c32
1 files changed, 19 insertions, 13 deletions
diff --git a/generic/tclBasic.c b/generic/tclBasic.c
index a570491..3e4e36d 100644
--- a/generic/tclBasic.c
+++ b/generic/tclBasic.c
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * SCCS: %Z% $Id: tclBasic.c,v 1.10 1998/08/10 15:43:41 welch Exp $
+ * SCCS: %Z% $Id: tclBasic.c,v 1.11 1998/08/10 17:18:18 rjohnson Exp $
*/
#include "tclInt.h"
@@ -1495,12 +1495,15 @@ Tcl_CreateCommand(interp, cmdName, proc, clientData, deleteProc)
* Plug in any existing import references found above. Be sure
* to update all of these references to point to the new command.
*/
- cmdPtr->importRefPtr = oldRefPtr;
- while (oldRefPtr != NULL) {
- refCmdPtr = oldRefPtr->importedCmdPtr;
- dataPtr = (ImportedCmdData*)refCmdPtr->objClientData;
- dataPtr->realCmdPtr = cmdPtr;
- oldRefPtr = oldRefPtr->nextPtr;
+
+ if (oldRefPtr != NULL) {
+ cmdPtr->importRefPtr = oldRefPtr;
+ while (oldRefPtr != NULL) {
+ refCmdPtr = oldRefPtr->importedCmdPtr;
+ dataPtr = (ImportedCmdData*)refCmdPtr->objClientData;
+ dataPtr->realCmdPtr = cmdPtr;
+ oldRefPtr = oldRefPtr->nextPtr;
+ }
}
/*
@@ -1654,12 +1657,15 @@ Tcl_CreateObjCommand(interp, cmdName, proc, clientData, deleteProc)
* Plug in any existing import references found above. Be sure
* to update all of these references to point to the new command.
*/
- cmdPtr->importRefPtr = oldRefPtr;
- while (oldRefPtr != NULL) {
- refCmdPtr = oldRefPtr->importedCmdPtr;
- dataPtr = (ImportedCmdData*)refCmdPtr->objClientData;
- dataPtr->realCmdPtr = cmdPtr;
- oldRefPtr = oldRefPtr->nextPtr;
+
+ if (oldRefPtr != NULL) {
+ cmdPtr->importRefPtr = oldRefPtr;
+ while (oldRefPtr != NULL) {
+ refCmdPtr = oldRefPtr->importedCmdPtr;
+ dataPtr = (ImportedCmdData*)refCmdPtr->objClientData;
+ dataPtr->realCmdPtr = cmdPtr;
+ oldRefPtr = oldRefPtr->nextPtr;
+ }
}
/*