[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v1 12/12] libxl: add device backend listener in order to launch backends
On 30/10/13 18:00, Ian Jackson wrote: > Roger Pau Monne writes ("[PATCH v1 12/12] libxl: add device backend listener > in order to launch backends"): >> + LIBXL_SLIST_FOREACH(ddev, &dguest->devices, next) { >> + if (memcmp(ddev->dev, dev, sizeof(*dev)) == 0) >> + return ddev; > > I'm afraid that you can't memcmp a struct like this. structs are > allowed to have padding which may contain junk. All the libxl__device structures have been allocated with libxl__zalloc, which should make the padding be 0 in all cases, but I agree it would be better to do it in a more formal way. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |