On 08/06/2012 05:52 AM, Daniel P. Berrange wrote: > From: "Daniel P. Berrange" <[email protected]> > > This introduces a fairly basic reference counted virObject type > and an associated virClass type, that use atomic operations for > ref counting. >
> +virClassPtr virClassNew(const char *name,
> + size_t objectSize,
> + virObjectDisposeCallback dispose)
> +{
> + virClassPtr klass;
> +
> + if (VIR_ALLOC(klass) < 0) {
> + virReportOOMError();
> + return NULL;
> + }
This could be simplified to:
if (VIR_ALLOC(klass) < 0)
goto no_memory;
> +/**
> + * virObjectFreeCallback:
> + * @opaque: a pointer to a virObject instance
> + *
> + * Provides identical functionality to virObjectUnref,
> + * but with the signature maching the virFreeCallback
s/maching/matching/
ACK.
--
Eric Blake [email protected] +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
-- libvir-list mailing list [email protected] https://www.redhat.com/mailman/listinfo/libvir-list
