aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap
diff options
context:
space:
mode:
authorMartin Mathieson <martin.r.mathieson@googlemail.com>2012-07-11 20:53:24 +0000
committerMartin Mathieson <martin.r.mathieson@googlemail.com>2012-07-11 20:53:24 +0000
commite7b8e93e2790b192107dc7190f11cd4b4b0b0788 (patch)
tree25997302c0ff22247131520f5beca35f7744bde1 /wiretap
parent220958548c420af312cd50d2a5be118c7ac60206 (diff)
memcpy() is quite a bit faster than g_strlcpy()!
svn path=/trunk/; revision=43675
Diffstat (limited to 'wiretap')
-rw-r--r--wiretap/catapult_dct2000.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/wiretap/catapult_dct2000.c b/wiretap/catapult_dct2000.c
index 7c981a5e7e..e929a0eafd 100644
--- a/wiretap/catapult_dct2000.c
+++ b/wiretap/catapult_dct2000.c
@@ -407,7 +407,7 @@ catapult_dct2000_read(wtap *wth, int *err, gchar **err_info _U_,
/* Create and use buffer for contents before time */
line_prefix_info->before_time = g_malloc(before_time_offset+2);
- g_strlcpy(line_prefix_info->before_time, linebuff, before_time_offset+1);
+ memcpy(line_prefix_info->before_time, linebuff, before_time_offset+1);
line_prefix_info->before_time[before_time_offset+1] = '\0';
/* Create and use buffer for contents before time.
@@ -421,8 +421,7 @@ catapult_dct2000_read(wtap *wth, int *err, gchar **err_info _U_,
else {
/* Allocate & write buffer for line between timestamp and data */
line_prefix_info->after_time = g_malloc(dollar_offset - after_time_offset);
- g_strlcpy(line_prefix_info->after_time, linebuff+after_time_offset,
- dollar_offset - after_time_offset);
+ memcpy(line_prefix_info->after_time, linebuff+after_time_offset, dollar_offset - after_time_offset);
line_prefix_info->after_time[dollar_offset - after_time_offset-1] = '\0';
}