summaryrefslogtreecommitdiff
path: root/miscutils
diff options
context:
space:
mode:
authorDenys Vlasenko2019-03-26 11:41:35 +0100
committerDenys Vlasenko2019-03-26 11:41:35 +0100
commit3395e2a8efc92c2198620cce6f90d39bffcbb393 (patch)
treef0e7dcbf4a59353684e91d28fe1980aa3794dae4 /miscutils
parentf370a66b263c4a887d37076a1b598ccbdc4766ff (diff)
downloadbusybox-3395e2a8efc92c2198620cce6f90d39bffcbb393.zip
busybox-3395e2a8efc92c2198620cce6f90d39bffcbb393.tar.gz
ts: replace overlapping strcpy with shorter code
function old new delta ts_main 401 398 -3 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'miscutils')
-rw-r--r--miscutils/ts.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/miscutils/ts.c b/miscutils/ts.c
index c389ab8..a282372 100644
--- a/miscutils/ts.c
+++ b/miscutils/ts.c
@@ -42,7 +42,8 @@ int ts_main(int argc UNUSED_PARAM, char **argv)
frac = is_suffixed_with(fmt_dt2str, "%.s");
if (frac) {
frac++;
- strcpy(frac, frac + 1);
+ frac[0] = frac[1];
+ frac[1] = '\0';
}
#define date_buf bb_common_bufsiz1