On 02/15/2013 02:22 PM, Peter Krempa wrote: >> - return 0; >> +done: >> + ret = meta; > > Um, is the ret variable really needed here? The only value it can take > is "meta" and return it right after. If this isn't needed in the next > patches I'd rather go for "return meta" here. > >> +cleanup: > > Rename this to "error" > >> + return ret; > > And "return NULL" instead;
Next patch turns moves the allocation into this function, at which point
the tail end becomes:
done:
ret = meta;
meta = NULL;
cleanup:
virStorageFileFreeMetadata(meta);
VIR_FREE(buf);
return ret;
>
>> }
>>
>>
>
> ACK if:
> 1) this change will be needed later
> 2) tweaked according to my suggestions
I'm going with option 1 - the labels make more sense once patch 3 is in
place.
--
Eric Blake eblake redhat com +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
