summaryrefslogtreecommitdiff
path: root/src/nl.c
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2009-08-10 08:11:33 +0200
committerJim Meyering <meyering@redhat.com>2009-08-10 09:17:07 +0200
commite32320de66f0587f288803330ea5e09341297153 (patch)
tree62ac1010cc3559d6cb40cbdd31eefa6ad25c136d /src/nl.c
parenteb2f9e84b951001970c6d2f6524f070cfc251007 (diff)
downloadcoreutils-e32320de66f0587f288803330ea5e09341297153.tar.xz
nl, pinky: replace uses of strcat
* src/nl.c (main): Avoid strcat, on principle. Use stpcpy instead. * src/pinky.c (print_long_entry): Likewise.
Diffstat (limited to 'src/nl.c')
-rw-r--r--src/nl.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nl.c b/src/nl.c
index 56d5a3998..2deb314a4 100644
--- a/src/nl.c
+++ b/src/nl.c
@@ -577,15 +577,15 @@ main (int argc, char **argv)
header_del_len = len * 3;
header_del = xmalloc (header_del_len + 1);
- strcat (strcat (strcpy (header_del, section_del), section_del), section_del);
+ stpcpy (stpcpy (stpcpy (header_del, section_del), section_del), section_del);
body_del_len = len * 2;
body_del = xmalloc (body_del_len + 1);
- strcat (strcpy (body_del, section_del), section_del);
+ stpcpy (stpcpy (body_del, section_del), section_del);
footer_del_len = len;
footer_del = xmalloc (footer_del_len + 1);
- strcpy (footer_del, section_del);
+ stpcpy (footer_del, section_del);
/* Initialize the input buffer. */
initbuffer (&line_buf);