Re: [hackers] [lsw] [PATCH] Improve compliance with our coding style
Hi Tom,
> - if (!XGetTextProperty(dpy, win, &prop, netwmname) || prop.nitems == 0)
> - if (!XGetWMName(dpy, win, &prop) || prop.nitems == 0)
> + if (!XGetTextProperty(dpy, win, &prop, netwmname) || !prop.nitems) {
> + if (!XGetWMName(dpy, win, &prop) || !prop.nitems)
> return "";
> + }
I disagree with “!prop.nitems” change.
Variable nitems isn't a boolean value,
it's a numeral counter,
so better testing explicitly against 0.
Rest of the changes are good though, thanks. :)
Received on Sun Jul 03 2022 - 23:36:21 CEST
This archive was generated by hypermail 2.3.0
: Sun Jul 03 2022 - 23:48:29 CEST