On Sun, Nov 08, 2015 at 02:37:58AM +0100, Alexander Bluhm wrote:
> > + for (i = 0; (i < size) && (rv == 0); i++) {
>
> rv is unitialized in the first interation
>
> > + io.pfrio_buffer = addr++;
> > + rv = ioctl(dev, DIOCRADDADDR, &io);
>
> I would suggest to return (-1) if ioctl fails...
>
> > + add++;
> > + }To keep the illusion of an atomic operation, we could remove the addresses we just added before the one add failed. bluhm
