From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Jackson Subject: Re: [PATCH] libxl: make libxl__poller_put tolerate p==NULL libxl_event_wait Date: Mon, 14 Oct 2013 17:49:18 +0100 Message-ID: <21084.8334.622386.755012@mariner.uk.xensource.com> References: <52399CA2.8080504@citrix.com> <1380432276-16016-1-git-send-email-mattjd@gmail.com> <1380807569.25618.0.camel@kazak.uk.xensource.com> <21079.56627.513787.948179@mariner.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Matthew Daley Cc: Andrew Cooper , Stefano Stabellini , Ian Campbell , "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org Matthew Daley writes ("Re: [PATCH] libxl: make libxl__poller_put tolerate p==NULL libxl_event_wait"): > On Sat, Oct 12, 2013 at 12:12 AM, Ian Jackson wrote: > > void libxl__poller_put(libxl_ctx *ctx, libxl__poller *p) > > { > > + if (!p) return; > > So before I go and send more libxl patches, what's the story with > single-line if statements like this? Is it acceptable in libxl (only?) > after all? >>From tools/libxl/CODING_STYLE: 4. Statements Don't put multiple statements on a single line. Don't put multiple assignments on a single line either. Error code paths with an if statement and a goto or a return on the same line are allowed. Examples: if (rc) goto out; Whether you think this is an error path is a matter of taste, I think. Ian.