From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NrEsz-0006ff-3D for qemu-devel@nongnu.org; Mon, 15 Mar 2010 14:19:29 -0400 Received: from [199.232.76.173] (port=51785 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NrEsy-0006eg-3Q for qemu-devel@nongnu.org; Mon, 15 Mar 2010 14:19:28 -0400 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NrEsx-0001bW-EM for qemu-devel@nongnu.org; Mon, 15 Mar 2010 14:19:27 -0400 Received: from mail-bw0-f218.google.com ([209.85.218.218]:45393) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NrEsx-0001bP-4B for qemu-devel@nongnu.org; Mon, 15 Mar 2010 14:19:27 -0400 Received: by bwz10 with SMTP id 10so5111365bwz.2 for ; Mon, 15 Mar 2010 11:19:25 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <4B9E7A29.1020902@redhat.com> Date: Mon, 15 Mar 2010 19:19:21 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH, RFC] Replace assert(0) with abort() or cpu_abort() List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Blue Swirl Cc: Markus Armbruster , qemu-devel >>> I sympathize with the general idea, but I don't like dead code >> after abort(). What about cleaning that up? >> > Good idea, but it should be a separate patch. This patch is "safe", > whereas the cleanup patch could cause problems if it's not done > carefully. This patch is "safe", however I'd consider not changing assert(0)->abort() if there is code after the assert that looks like an attempt at recovering. Example: if (!p) { printf ("the impossible has happened!"); assert (0); } return p->q; should be changed to abort, while if (!p) { printf ("the impossible has happened!"); assert (0); return 0; } return p->q; should not. Paolo