public inbox for b.a.t.m.a.n@lists.open-mesh.org
 help / color / mirror / Atom feed
* [B.A.T.M.A.N.] [PATCH] Let the compiler interpret the noreturn situation in restore_and_exit correct
@ 2008-10-09  7:35 Sven Eckelmann
  2008-10-12 22:47 ` [B.A.T.M.A.N.] configuration of B.A.T.M.A.N Resul Cetin
  0 siblings, 1 reply; 3+ messages in thread
From: Sven Eckelmann @ 2008-10-09  7:35 UTC (permalink / raw)
  To: b.a.t.m.a.n

It is just implicit that raise will not return in this case because we are in
a sighandler right now. So let call exit always afterwards even if it will
not be reached.

Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
---
 batman/posix/posix.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/batman/posix/posix.c b/batman/posix/posix.c
index 4423345..bbeac38 100644
--- a/batman/posix/posix.c
+++ b/batman/posix/posix.c
@@ -497,11 +497,10 @@ void restore_and_exit( uint8_t is_sigsegv ) {
 
 	}
 
-	if (!is_sigsegv)
-		exit(EXIT_FAILURE);
-	else
+	if (is_sigsegv)
 		raise(SIGSEGV);
 
+	exit(EXIT_FAILURE);
 }
 
 
-- 
1.6.0.1



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

end of thread, other threads:[~2008-10-13  0:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-09  7:35 [B.A.T.M.A.N.] [PATCH] Let the compiler interpret the noreturn situation in restore_and_exit correct Sven Eckelmann
2008-10-12 22:47 ` [B.A.T.M.A.N.] configuration of B.A.T.M.A.N Resul Cetin
2008-10-13  0:55   ` Don Davis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox