
21 Sep
2012
21 Sep
'12
4:38 p.m.
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 eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org