On Wed, Mar 22, 2017 at 05:49:46PM +0100, Pino Toscano wrote:
> > + elem = strtok_r (lines[0], ",",
&saveptr);
>
> You can probably use strtok here [I think?] if it's simpler.
I'd maybe if this was in the daemon, which runs single-threaded.
OTOH, using a non-reentrant strtok in the library might cause conflicts
with multithreaded applications using libguestfs.
Good point, I'd forgotten that strtok kept static internal state.
Rich.
--
Richard Jones, Virtualization Group, Red Hat
http://people.redhat.com/~rjones
Read my programming and virtualization blog:
http://rwmj.wordpress.com
virt-p2v converts physical machines to virtual machines. Boot with a
live CD or over the network (PXE) and turn machines into KVM guests.
http://libguestfs.org/virt-v2v