Re: [PATCH v4 01/13] Adapt to VIR_STRDUP and VIR_STRNDUP in src/conf/*

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 05/21/2013 03:14 AM, Michal Privoznik wrote:
>>> @@ -392,17 +392,14 @@ virCapabilitiesAddGuest(virCapsPtr caps,
>>>      if (VIR_ALLOC(guest) < 0)
>>>          goto no_memory;
>>>  
>>> -    if ((guest->ostype = strdup(ostype)) == NULL)
>>> +    if (VIR_STRDUP(guest->ostype, ostype) < 0)
>>>          goto no_memory;
>>
>> Local double-oom.  You might want to clean this one up now.
> 
> You mean s/no_memory/error/ ? Because even if the label is called
> no_memory not every label does call virReportOOMError(), like in this case.

Ah, now that I look at the label, you're right!

Yes, s/no_memory/error/ would avoid my confusion (generally, I've been
assuming that a no_memory label implied an OOM report).

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]