diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2005-05-19 22:49:01 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2005-05-19 22:49:01 (GMT) |
commit | 10afebb29b67f5e25bc1d9c998db696979b548c2 (patch) | |
tree | 60f40452e22ce2f221e7552db74c8d4b59eb6673 /generic/tclNamesp.c | |
parent | 3a98c966f5664f75dfa14bc50c0b17aedf114b71 (diff) | |
download | tcl-10afebb29b67f5e25bc1d9c998db696979b548c2.zip tcl-10afebb29b67f5e25bc1d9c998db696979b548c2.tar.gz tcl-10afebb29b67f5e25bc1d9c998db696979b548c2.tar.bz2 |
Quell a gcc warning
Diffstat (limited to 'generic/tclNamesp.c')
-rw-r--r-- | generic/tclNamesp.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/generic/tclNamesp.c b/generic/tclNamesp.c index 27f5603..61329d3 100644 --- a/generic/tclNamesp.c +++ b/generic/tclNamesp.c @@ -21,7 +21,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclNamesp.c,v 1.74 2005/05/10 18:34:45 kennykb Exp $ + * RCS: @(#) $Id: tclNamesp.c,v 1.75 2005/05/19 22:49:01 dkf Exp $ */ #include "tclInt.h" @@ -1699,10 +1699,11 @@ Tcl_ForgetImport(interp, namespacePtr, pattern) if (TclMatchIsTrivial(simplePattern)) { Command *cmdPtr; hPtr = Tcl_FindHashEntry(&nsPtr->cmdTable, simplePattern); - (hPtr != NULL) + if ((hPtr != NULL) && (cmdPtr = (Command *) Tcl_GetHashValue(hPtr)) - && (cmdPtr->deleteProc == DeleteImportedCmd) - && Tcl_DeleteCommandFromToken(interp, (Tcl_Command) cmdPtr); + && (cmdPtr->deleteProc == DeleteImportedCmd)) { + Tcl_DeleteCommandFromToken(interp, (Tcl_Command) cmdPtr); + } return TCL_OK; } for (hPtr = Tcl_FirstHashEntry(&nsPtr->cmdTable, &search); |