diff options
author | kennykb <kennykb@noemail.net> | 2005-12-02 22:13:40 (GMT) |
---|---|---|
committer | kennykb <kennykb@noemail.net> | 2005-12-02 22:13:40 (GMT) |
commit | daad2214ad8b2353e4d6c2d7d667cebb8325a6b8 (patch) | |
tree | 3cbcc441bcbfe452d218076d812b767e4fa3b16c /generic/tclClock.c | |
parent | c4bd95ca5f8075890feaafea7661c6f6d1409c3d (diff) | |
download | tcl-daad2214ad8b2353e4d6c2d7d667cebb8325a6b8.zip tcl-daad2214ad8b2353e4d6c2d7d667cebb8325a6b8.tar.gz tcl-daad2214ad8b2353e4d6c2d7d667cebb8325a6b8.tar.bz2 |
another puny speedup - no error thrown from ::tcl::clock::getenv
FossilOrigin-Name: ba6ea252870935b03bacff5185cba297bf457d4b
Diffstat (limited to 'generic/tclClock.c')
-rw-r--r-- | generic/tclClock.c | 11 |
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; } /* |