summaryrefslogtreecommitdiffstats
path: root/runtime/string.c
diff options
context:
space:
mode:
authorhunt <hunt>2006-04-11 05:13:46 +0000
committerhunt <hunt>2006-04-11 05:13:46 +0000
commit10a8db4bedc18df8f8ef14733c6e35b38ca4ef12 (patch)
tree9db6ff3744762cc209f2b9c1901c6565430eb8c2 /runtime/string.c
parent048c97644c4a6bff95de01e4e74b7343775d24b2 (diff)
downloadsystemtap-steved-10a8db4bedc18df8f8ef14733c6e35b38ca4ef12.tar.gz
systemtap-steved-10a8db4bedc18df8f8ef14733c6e35b38ca4ef12.tar.xz
systemtap-steved-10a8db4bedc18df8f8ef14733c6e35b38ca4ef12.zip
2006-04-10 Martin Hunt <hunt@redhat.com>
* string.c (_stp_string_cat_cstr): No need to copy terminating 0.
Diffstat (limited to 'runtime/string.c')
-rw-r--r--runtime/string.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/string.c b/runtime/string.c
index efb4d595..fa8e2dda 100644
--- a/runtime/string.c
+++ b/runtime/string.c
@@ -134,7 +134,7 @@ void _stp_string_cat_cstr (String str1, const char *str2)
num = STP_PRINT_BUF_LEN;
}
buf = &_stp_pbuf[cpu][STP_PRINT_BUF_START] + _stp_pbuf_len[cpu];
- memcpy (buf, str2, num + 1);
+ memcpy (buf, str2, num);
_stp_pbuf_len[cpu] += num;
} else {
int size = STP_STRING_SIZE - str1->len - 1;