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 [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
