diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2023-03-30 22:22:32 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2023-03-30 22:22:32 (GMT) |
commit | feac96c8b3c738ef7cb8e3e89e076aa4f23f13b0 (patch) | |
tree | 196f438c5ba746829c249ad28e10c94a4a44ee0c /generic/tclLiteral.c | |
parent | 67ced520761d9c2dff0022dafbebdb996e20b551 (diff) | |
parent | ed24f448c79bc5af4c0f6fd77826a6552271dd9c (diff) | |
download | tcl-feac96c8b3c738ef7cb8e3e89e076aa4f23f13b0.zip tcl-feac96c8b3c738ef7cb8e3e89e076aa4f23f13b0.tar.gz tcl-feac96c8b3c738ef7cb8e3e89e076aa4f23f13b0.tar.bz2 |
Merge 8.7
Diffstat (limited to 'generic/tclLiteral.c')
-rw-r--r-- | generic/tclLiteral.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/generic/tclLiteral.c b/generic/tclLiteral.c index c3f0f7d..c189b50 100644 --- a/generic/tclLiteral.c +++ b/generic/tclLiteral.c @@ -1128,18 +1128,18 @@ TclLiteralStats( */ result = (char *)Tcl_Alloc(NUM_COUNTERS*60 + 300); - sprintf(result, "%" TCL_Z_MODIFIER "u entries in table, %" TCL_Z_MODIFIER "u buckets\n", + snprintf(result, 60, "%" TCL_Z_MODIFIER "u entries in table, %" TCL_Z_MODIFIER "u buckets\n", tablePtr->numEntries, tablePtr->numBuckets); p = result + strlen(result); for (i=0 ; i<NUM_COUNTERS ; i++) { - sprintf(p, "number of buckets with %" TCL_Z_MODIFIER "u entries: %" TCL_Z_MODIFIER "u\n", + snprintf(p, 60, "number of buckets with %" TCL_Z_MODIFIER "u entries: %" TCL_Z_MODIFIER "u\n", i, count[i]); p += strlen(p); } - sprintf(p, "number of buckets with %d or more entries: %" TCL_Z_MODIFIER "u\n", + snprintf(p, 60, "number of buckets with %d or more entries: %" TCL_Z_MODIFIER "u\n", NUM_COUNTERS, overflow); p += strlen(p); - sprintf(p, "average search distance for entry: %.1f", average); + snprintf(p, 60, "average search distance for entry: %.1f", average); return result; } #endif /*TCL_COMPILE_STATS*/ |