On 03/09/2011 08:07 AM, Daniel P. Berrange wrote:
> Rather than have the two strdup("rdev=?") calls, I reckon it
> would be better to just return NULL. Then the caller can just
> check for NULL itself & fallback to a static "rdev=?".
>
> In fact, perhaps this should just do
>
> virAsprintf(&ret, "%02X:%02X", maj, min);
>
> And...
>
>> + if (!(detail = virAuditEncode("path", path)) ||
>> + !(rdev = qemuAuditGetRdev(path)) ||
>> + virAsprintf(&extra, "path path=%s %s", path, rdev) < 0) {
>
> ...here do
>
> virAsprintf(&extra, "path path=%s rdev=%s", path,
> VIR_AUDIT_STR(rdev)) < 0) {
> Yeah, that's nicer. Will do. > ACK, to the rest of the patch though. -- Eric Blake [email protected] +1-801-349-2682 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
