summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorKevin B Kenny <kennykb@acm.org>2005-12-02 22:13:41 (GMT)
committerKevin B Kenny <kennykb@acm.org>2005-12-02 22:13:41 (GMT)
commitd9a79d52dafdcdf2079951636d5ec6f1ac96a15b (patch)
tree3cbcc441bcbfe452d218076d812b767e4fa3b16c /generic
parent085b704108e13ba22ac2ce549e259e291740ad68 (diff)
downloadtcl-d9a79d52dafdcdf2079951636d5ec6f1ac96a15b.zip
tcl-d9a79d52dafdcdf2079951636d5ec6f1ac96a15b.tar.gz
tcl-d9a79d52dafdcdf2079951636d5ec6f1ac96a15b.tar.bz2
another puny speedup - no error thrown from ::tcl::clock::getenv
Diffstat (limited to 'generic')
-rw-r--r--generic/tclClock.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/generic/tclClock.c b/generic/tclClock.c
index 522f6b1..69abb95 100644
--- a/generic/tclClock.c
+++ b/generic/tclClock.c
@@ -12,7 +12,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclClock.c,v 1.48 2005/12/01 06:11:40 das Exp $
+ * RCS: @(#) $Id: tclClock.c,v 1.49 2005/12/02 22:13:41 kennykb Exp $
*/
#include "tclInt.h"
@@ -1481,13 +1481,10 @@ ClockGetenvObjCmd(
varName = Tcl_GetStringFromObj(objv[1], NULL);
varValue = getenv(varName);
if (varValue == NULL) {
- Tcl_SetObjResult(interp,
- Tcl_NewStringObj("variable not found", -1));
- return TCL_ERROR;
- } else {
- Tcl_SetObjResult(interp, Tcl_NewStringObj(varValue, -1));
- return TCL_OK;
+ varValue = "";
}
+ Tcl_SetObjResult(interp, Tcl_NewStringObj(varValue, -1));
+ return TCL_OK;
}
/*