summaryrefslogtreecommitdiffstats
path: root/generic/tclHash.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2004-03-30 22:27:48 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2004-03-30 22:27:48 (GMT)
commit982e8b7e164ff00826c6acf9026c553b7c6fd4e4 (patch)
tree80c239bbe0fa5389c0f440b7627e90fea9711d0a /generic/tclHash.c
parentb5ebf1656938111f1f790346ed24cc0bb450ee69 (diff)
downloadtcl-982e8b7e164ff00826c6acf9026c553b7c6fd4e4.zip
tcl-982e8b7e164ff00826c6acf9026c553b7c6fd4e4.tar.gz
tcl-982e8b7e164ff00826c6acf9026c553b7c6fd4e4.tar.bz2
More hash function cleaning up.
Diffstat (limited to 'generic/tclHash.c')
-rw-r--r--generic/tclHash.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/generic/tclHash.c b/generic/tclHash.c
index 3d8fd00..99502b3 100644
--- a/generic/tclHash.c
+++ b/generic/tclHash.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclHash.c,v 1.16 2003/12/24 04:18:19 davygrvy Exp $
+ * RCS: @(#) $Id: tclHash.c,v 1.17 2004/03/30 22:27:49 dkf Exp $
*/
#include "tclInt.h"
@@ -1047,13 +1047,9 @@ HashStringKey(tablePtr, keyPtr)
*/
result = 0;
- while (1) {
- c = *string;
- if (c == 0) {
- break;
- }
+
+ for (c=*string++ ; c ; c=*string++) {
result += (result<<3) + c;
- string++;
}
return result;
}