mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-16 06:28:14 +00:00
isisd: Remove unnecessary use of strcpy
`strcpy` is a dangerous function and should not be used. In this particular place, there is no need for copying strings at all, so let's just stick to referencing static strings. Signed-off-by: Christian Franke <chris@opensourcerouting.org>
This commit is contained in:
parent
637b00caa8
commit
5627d3fec2
@ -738,11 +738,7 @@ DEFUN (clear_isis_neighbor_arg,
|
||||
*/
|
||||
void print_debug(struct vty *vty, int flags, int onoff)
|
||||
{
|
||||
char onoffs[4];
|
||||
if (onoff)
|
||||
strcpy(onoffs, "on");
|
||||
else
|
||||
strcpy(onoffs, "off");
|
||||
const char *onoffs = onoff ? "on" : "off";
|
||||
|
||||
if (flags & DEBUG_ADJ_PACKETS)
|
||||
vty_out(vty,
|
||||
|
Loading…
Reference in New Issue
Block a user