Hi,
> - Color *cp;
>
> if(loaded) {
> - for (cp = dc.col; cp < dc.col + LEN(dc.col); ++cp)
> - XftColorFree(xw.dpy, xw.vis, xw.cmap, cp);
> + for (i = 0; i < LEN(dc.col); i++)
> + XftColorFree(xw.dpy, xw.vis, xw.cmap, &dc.col[i]);
> }
>
I prefer the pointer version. I don't know why an index version
is better in this case. The reference here is [1], section "The
use of pointers".
Regards,
[1]
http://www.lysator.liu.se/c/pikestyle.html
Received on Tue Apr 21 2015 - 07:54:27 CEST