From patchwork Thu Oct 9 07:35:55 2008 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Eckelmann X-Patchwork-Id: 5336 Received: from lana.hrz.tu-chemnitz.de (lana.hrz.tu-chemnitz.de [134.109.132.3]) by open-mesh.net (8.13.4/8.13.4/Debian-3sarge3) with ESMTP id m997ejpU003220 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Thu, 9 Oct 2008 09:40:46 +0200 Received: from galba.hrz.tu-chemnitz.de ([134.109.133.156] helo=mailbox.hrz.tu-chemnitz.de) by lana.hrz.tu-chemnitz.de with esmtps (TLSv1:AES256-SHA:256) (Exim 4.69) (envelope-from ) id 1Knq3w-0007cJ-F7 for b.a.t.m.a.n@open-mesh.net; Thu, 09 Oct 2008 09:35:56 +0200 Received: from vpnclient-014.hrz.tu-chemnitz.de ([134.109.232.14] helo=sven-desktop) by mailbox.hrz.tu-chemnitz.de with smtp (Exim 4.69) (envelope-from ) id 1Knq3v-000583-PL for b.a.t.m.a.n@open-mesh.net; Thu, 09 Oct 2008 09:35:56 +0200 Received: by sven-desktop (nbSMTP-1.00) for uid 1000 sven.eckelmann@gmx.de; Thu, 9 Oct 2008 09:35:55 +0200 (CEST) Date: Thu, 9 Oct 2008 09:35:55 +0200 From: Sven Eckelmann To: b.a.t.m.a.n@open-mesh.net Message-ID: <20081009073555.GA4544@sven-desktop.lazhur.ath.cx> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) X-Scan-Signature: 436c3bd0995e981f274ba4aec8e8b0d5 Subject: [B.A.T.M.A.N.] [PATCH] Let the compiler interpret the noreturn situation in restore_and_exit correct X-BeenThere: b.a.t.m.a.n@open-mesh.net X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The list for a Better Approach To Mobile Ad-hoc Networking List-Id: The list for a Better Approach To Mobile Ad-hoc Networking List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Oct 2008 07:40:46 -0000 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 --- 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); }