summaryrefslogtreecommitdiffstats
path: root/runtime/map.c
diff options
context:
space:
mode:
authorhunt <hunt>2006-03-30 20:54:00 +0000
committerhunt <hunt>2006-03-30 20:54:00 +0000
commitcf0c46c27bca3de031b0ce546c11153430ebd9df (patch)
treea61637c0205835bb51933ea1d2fc052940795e1a /runtime/map.c
parentda4e78db674a1ca836a15120a49848308c00270f (diff)
downloadsystemtap-steved-cf0c46c27bca3de031b0ce546c11153430ebd9df.tar.gz
systemtap-steved-cf0c46c27bca3de031b0ce546c11153430ebd9df.tar.xz
systemtap-steved-cf0c46c27bca3de031b0ce546c11153430ebd9df.zip
2006-03-30 Martin Hunt <hunt@redhat.com>
* string.c (_stp_string_cat_cstr): Use memcpy() instead of strncpy().
Diffstat (limited to 'runtime/map.c')
-rw-r--r--runtime/map.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/runtime/map.c b/runtime/map.c
index 1e9fd62a..326f95aa 100644
--- a/runtime/map.c
+++ b/runtime/map.c
@@ -42,7 +42,7 @@ void str_copy(char *dest, char *src)
int len = strlen(src);
if (len > MAP_STRING_LENGTH - 1)
len = MAP_STRING_LENGTH - 1;
- strncpy (dest, src, len);
+ memcpy (dest, src, len);
dest[len] = 0;
}
@@ -55,7 +55,7 @@ void str_add(void *dest, char *val)
if (len > num)
len = num;
- strncpy (&dst[len1], val, len);
+ memcpy (&dst[len1], val, len);
dst[len + len1] = 0;
}