|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v4 1/2] libxl: Introduce functions to add and remove USB devices to an HVM guest
On 17/04/13 11:13, Ian Campbell wrote: On Wed, 2013-04-17 at 11:02 +0100, George Dunlap wrote:On 17/04/13 10:58, Ian Campbell wrote:On Tue, 2013-04-16 at 19:00 +0100, Roger Pau Monnà wrote:+ libxl_usb_path = libxl__sprintf(gc, "%s/usb", libxl_path);I would recommend to use GCSPRINTF instead, it already checks for errorsGCSPRINTF and libxl__sprintf have the same amount of error checking. The more important point is that the libxl memory allocation functions/macros all panic on ENOMEM so there is no need for code in general to check for allocation errors. i.e. This block... I think that makes sense on a function-by-function, or perhaps file-by-file basis, but I personally think it's a bad idea to mix "templates" in one function like that. But if that's the plan, I'll go with it. -George _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |