[PATCH 03/16] utils/net: rtifconfig: display device name untruncated

Philippe Gerum rpm at xenomai.org
Thu Mar 21 18:13:17 CET 2019


From: Gilles Chanteperdrix <gilles.chanteperdrix at xenomai.org>

Signed-off-by: Philippe Gerum <rpm at xenomai.org>
---
 utils/net/rtifconfig.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/utils/net/rtifconfig.c b/utils/net/rtifconfig.c
index 8117e127c..9a9abfc4c 100644
--- a/utils/net/rtifconfig.c
+++ b/utils/net/rtifconfig.c
@@ -183,7 +183,7 @@ void print_dev(void)
     struct itf_stats *itf;
 
 
-    cmd.head.if_name[9] = 0;
+    cmd.head.if_name[IFNAMSIZ - 1] = 0;
 
     printf("%-9s Medium: ", cmd.head.if_name);
 
-- 
2.20.1




More information about the Xenomai mailing list