[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v2] libxc: Fix buffer length for get_suspend_file



Ian Campbell writes ("Re: [PATCH v2] libxc: Fix buffer length for 
get_suspend_file"):
> On Tue, 2014-03-18 at 13:58 +0000, Ian Jackson wrote:
> > Declaring a formal parameter to have an array type doesn't result in
> > the parameter actually having an array type.  The type is "adjusted"
> > to a pointer.  (C99 6.9.1(7), 6.7.5.3.)
...
> Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx>

Thanks, I've pushed it.

> Although I do wonder if it would be less error prone to push the size up
> to a parameter to get_suspend_file where it is (presumably) near to the
> declaration of the array.

I don't think so: this one-line function only has two call sites.  It
doesn't seem sensible to me to lift any of its contents into the call
sites in the name of clarity.

Ian.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.