On 09/21/2012 07:21 AM, Daniel P. Berrange wrote:
>>> +    while (!feof(fp)) {
>>> +        char *line;
>>> +        char *file, *context;
>>> +        if (VIR_ALLOC_N(line, 1024) < 0) {
>>> +            virReportOOMError();
>>> +            goto cleanup;
>>> +        }
>>> +        if (!fgets(line, 1024, fp)) {
>>
>> Is readline() any easier to use than VIR_ALLOC_N/fgets()?
> 
> Is readline() really what you meant ? That function is for
> prompting on stdio and reading a response.

s/readline/getline/

(What, you can't read my mind? :)

-- 
Eric Blake   ebl...@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@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Reply via email to