From: "Jan Beulich" Subject: Re: [PATCH v6 5/9] Add an implentation of asprintf() for xen Date: Thu, 08 May 2014 15:56:57 +0100 Message-ID: <536BB7590200007800010879@mail.emea.novell.com> References: <1399555424-25201-1-git-send-email-paul.durrant@citrix.com> <1399555424-25201-6-git-send-email-paul.durrant@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1399555424-25201-6-git-send-email-paul.durrant@citrix.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Paul Durrant Cc: Keir Fraser , Tim Deegan , Ian Jackson , Ian Campbell , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org >>> On 08.05.14 at 15:23, wrote: > +int vasprintf(char **bufp, const char *fmt, va_list args) > +{ > + va_list args_copy; > + size_t size; > + char *buf, dummy[1]; > + > + va_copy(args_copy, args); > + size = vsnprintf(dummy, 0, fmt, args_copy); Is there a reason for the first argument not simply being NULL? Jan