aboutsummaryrefslogtreecommitdiff
path: root/libsframe/sframe-dump.c
diff options
context:
space:
mode:
authorIndu Bhagat <indu.bhagat@oracle.com>2023-01-13 11:15:43 -0800
committerIndu Bhagat <indu.bhagat@oracle.com>2023-01-13 11:15:43 -0800
commit68e0003e12184a9bc13e06d35b6bb168f5f27ed3 (patch)
tree92de563e9a7da054445ac6c8834b2bdf43baa233 /libsframe/sframe-dump.c
parent027d8f7848f30e5b075dc0c9d74107a1747de190 (diff)
downloadgdb-68e0003e12184a9bc13e06d35b6bb168f5f27ed3.zip
gdb-68e0003e12184a9bc13e06d35b6bb168f5f27ed3.tar.gz
gdb-68e0003e12184a9bc13e06d35b6bb168f5f27ed3.tar.bz2
libsframe: replace an strncat with strcat
Calling strncat with the size of the src string is not so meaningful. The length argument to strncat should specify the remaining bytes bytes in the destination; although in this case, it appears to be unncessary altogether to use strncat in the first place. libsframe/ * sframe-dump.c (dump_sframe_func_with_fres): Use of strcat is just as fine.
Diffstat (limited to 'libsframe/sframe-dump.c')
-rw-r--r--libsframe/sframe-dump.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/libsframe/sframe-dump.c b/libsframe/sframe-dump.c
index 320555a..5417a16 100644
--- a/libsframe/sframe-dump.c
+++ b/libsframe/sframe-dump.c
@@ -176,8 +176,7 @@ dump_sframe_func_with_fres (sframe_decoder_ctx *sfd_ctx,
const char *ra_mangled_p_str
= ((sframe_fre_get_ra_mangled_p (sfd_ctx, &fre, &err[2]))
? "[s]" : " ");
- size_t ra_mangled_p_str_size = strlen (ra_mangled_p_str);
- strncat (temp, ra_mangled_p_str, ra_mangled_p_str_size);
+ strcat (temp, ra_mangled_p_str);
printf ("%-13s", temp);
}
}