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

Re: [Xen-devel] usage of libxl__sprintf for flexarray_append

On Mon, 2014-03-17 at 10:15 +0100, Olaf Hering wrote:
> What is the reason for code like this in device_disk_add?
>     flexarray_append(back, libxl__sprintf(gc, "%d", 1));
> A few lines above a known value of 1 is written without sprintf, and
> later cdrom/disk and r/w is also written as string.

I think it's just a historic accident. Feel free to fix.

If you are touching this stuff then IMHO the chains of flexarray_appends
for key/value pairs should use flexarray_append_pair to make it clearer
they are related, but perhaps that's a cleanup for another time.


Xen-devel mailing list



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