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

Re: [Xen-devel] [PATCH v2 02/21] xen: guestcopy: Provide an helper to safely copy string from guest



On Tue, 2014-09-09 at 14:17 +0100, Jan Beulich wrote:
> >>> On 09.09.14 at 14:52, <Ian.Campbell@xxxxxxxxxx> wrote:
> > On Fri, 2014-08-01 at 09:40 +0100, Jan Beulich wrote:
> >> >>> On 31.07.14 at 17:00, <julien.grall@xxxxxxxxxx> wrote:
> >> > --- /dev/null
> >> > +++ b/xen/common/guestcopy.c
> >> > @@ -0,0 +1,29 @@
> >> > +#include <xen/config.h>
> >> > +#include <xen/lib.h>
> >> > +#include <xen/guest_access.h>
> >> > +
> >> > +/* The function copies a string from the guest and add a NUL-terminated 
> >> > to
> >> > + * make sure the string is correctly finished. */
> >> 
> >> "... and adds a NUL-terminator ...". Also not sure about "finished"
> >> here.
> > 
> > It does sound odd. "correctly terminated" would be more usual, but given
> > the context is repetitive. Perhaps: "and add a NULL to make sure that
> > the string is correctly terminated"?
> 
> With s/add/adds/, maybe.

Yes.

>  Albeit personally I dislike using NULL for
> other than pointers - I'd prefer NUL or NIL for the purpose here.

Me too, that was a typo, sorry!

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®.