From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:50031) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QDCak-0003Jm-TM for qemu-devel@nongnu.org; Fri, 22 Apr 2011 05:23:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QDCaj-0005cz-Tu for qemu-devel@nongnu.org; Fri, 22 Apr 2011 05:23:58 -0400 Received: from bhuna.collabora.co.uk ([93.93.128.226]:35975) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QDCaj-0005cs-Pk for qemu-devel@nongnu.org; Fri, 22 Apr 2011 05:23:57 -0400 From: Ian Molton In-Reply-To: <4DB02F5D.7020204@linux.vnet.ibm.com> References: <1303138953-1334-1-git-send-email-mdroth@linux.vnet.ibm.com> <1303138953-1334-16-git-send-email-mdroth@linux.vnet.ibm.com> <4DAFEFEA.9020102@redhat.com> <4DB02F5D.7020204@linux.vnet.ibm.com> Content-Type: text/plain; charset="UTF-8" Date: Fri, 22 Apr 2011 10:23:55 +0100 Message-ID: <1303464235.20064.1.camel@corwyn> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC][PATCH v2 15/17] guest agent: qemu-ga daemon Reply-To: ian.molton@collabora.co.uk List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Michael Roth Cc: Jes Sorensen , agl@linux.vnet.ibm.com, qemu-devel@nongnu.org, aliguori@linux.vnet.ibm.com On Thu, 2011-04-21 at 08:21 -0500, Michael Roth wrote: > >> + switch (level& G_LOG_LEVEL_MASK) { > >> + case G_LOG_LEVEL_ERROR: return "error"; > >> + case G_LOG_LEVEL_CRITICAL: return "critical"; > >> + case G_LOG_LEVEL_WARNING: return "warning"; > >> + case G_LOG_LEVEL_MESSAGE: return "message"; > >> + case G_LOG_LEVEL_INFO: return "info"; > >> + case G_LOG_LEVEL_DEBUG: return "debug"; > >> + default: return "user"; > >> + } > > > > Urgh! > > > > No two statements on the same line please! Always wondered what the logic for this one is. IMHO the above is FAR neater than splitting it to near double its height. What kind of coding error does splitting this out aim to prevent? missing break; / return; statements? Because I dont see how it achieves that...