public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
* [PATCH] passt-repair: Dodge "structurally unreachable code" warning from Coverity
@ 2025-02-07  1:01 Stefano Brivio
  2025-02-07  1:18 ` David Gibson
  0 siblings, 1 reply; 2+ messages in thread
From: Stefano Brivio @ 2025-02-07  1:01 UTC (permalink / raw)
  To: passt-dev; +Cc: Paul Holzinger

While main() conventionally returns int, and we need a return at the
end of the function to avoid compiler warnings, turning that return
into _exit() to avoid exit handlers triggers a Coverity warning. It's
unreachable code anyway, so switch that single occurence back to a
plain return.

Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
---
 passt-repair.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/passt-repair.c b/passt-repair.c
index 5ad5c9c..322066a 100644
--- a/passt-repair.c
+++ b/passt-repair.c
@@ -173,5 +173,5 @@ loop:
 
 	goto loop;
 
-	_exit(0);
+	return 0;
 }
-- 
@@ -173,5 +173,5 @@ loop:
 
 	goto loop;
 
-	_exit(0);
+	return 0;
 }
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-02-07  1:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-02-07  1:01 [PATCH] passt-repair: Dodge "structurally unreachable code" warning from Coverity Stefano Brivio
2025-02-07  1:18 ` David Gibson

Code repositories for project(s) associated with this public inbox

	https://passt.top/passt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for IMAP folder(s).