From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH RFC 4/9] libxl_internal: introduce libxl__json_object_is_{null, number, double} Date: Mon, 14 Apr 2014 18:04:27 +0100 Message-ID: <1397495067.7802.29.camel@dagon.hellion.org.uk> References: <1397144422-18906-1-git-send-email-wei.liu2@citrix.com> <1397144422-18906-6-git-send-email-wei.liu2@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1397144422-18906-6-git-send-email-wei.liu2@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Wei Liu Cc: ian.jackson@eu.citrix.com, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Thu, 2014-04-10 at 16:40 +0100, Wei Liu wrote: > ... which return true if json object is valid and of type > JSON_{NULL,NUMBER,DOUBLE}. > > Signed-off-by: Wei Liu Acked-by: Ian Campbell But... > +static inline bool libxl__json_object_is_null(const libxl__json_object *o) > +{ > + return o != NULL && o->type == JSON_NULL; Shouldn't these (new and existing) use the bit field stuff you just introduced? Ian.