summaryrefslogtreecommitdiffstats
path: root/generic/tkSelect.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2019-04-04 22:08:55 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2019-04-04 22:08:55 (GMT)
commit13aa1a63c6190d65ae8c2ed113c48b4f531d1867 (patch)
tree15b914731e4be30435c5832103c3ba96c9ccf91b /generic/tkSelect.c
parent2eb951782866ecd73369684de756732a468a79e1 (diff)
downloadtk-13aa1a63c6190d65ae8c2ed113c48b4f531d1867.zip
tk-13aa1a63c6190d65ae8c2ed113c48b4f531d1867.tar.gz
tk-13aa1a63c6190d65ae8c2ed113c48b4f531d1867.tar.bz2
Remove a few unnecessary (size_t) type-casts, and add a "const"
Diffstat (limited to 'generic/tkSelect.c')
-rw-r--r--generic/tkSelect.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/generic/tkSelect.c b/generic/tkSelect.c
index e088bf5..563a0c4 100644
--- a/generic/tkSelect.c
+++ b/generic/tkSelect.c
@@ -1387,7 +1387,7 @@ HandleTclCommand(
string = Tcl_GetStringFromObj(Tcl_GetObjResult(interp), &length);
count = (length > maxBytes) ? maxBytes : length;
- memcpy(buffer, string, (size_t) count);
+ memcpy(buffer, string, count);
buffer[count] = '\0';
/*
@@ -1410,7 +1410,7 @@ HandleTclCommand(
cmdInfoPtr->charOffset += numChars;
length = p - string;
if (length > 0) {
- strncpy(cmdInfoPtr->buffer, string, (size_t) length);
+ strncpy(cmdInfoPtr->buffer, string, length);
}
cmdInfoPtr->buffer[length] = '\0';
}