Calling printf in signal handler is not async-signal-safe.
The printf was unnecessary anyway so remove it.
Found by GCC -fanalyzer.

Signed-off-by: Stephen Hemminger <[email protected]>
Acked-by: Bruce Richardson <[email protected]>
---
 examples/l2fwd-macsec/main.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/examples/l2fwd-macsec/main.c b/examples/l2fwd-macsec/main.c
index 059f8a2170..33113cb0f5 100644
--- a/examples/l2fwd-macsec/main.c
+++ b/examples/l2fwd-macsec/main.c
@@ -1247,11 +1247,8 @@ check_all_ports_link_status(uint32_t port_mask)
 static void
 signal_handler(int signum)
 {
-       if (signum == SIGINT || signum == SIGTERM) {
-               printf("\n\nSignal %d received, preparing to exit...\n",
-                               signum);
+       if (signum == SIGINT || signum == SIGTERM)
                force_quit = true;
-       }
 }
 
 int
-- 
2.53.0

Reply via email to