diff options
code-style: simplify some checks
main change here is making the `zoom()` logic saner. the rest of the
changes are just small stuff which accumulated on my local branch.
pop() must not be called with NULL. and `zoom()` achieves this, but in a
very (unnecessarily) complicated way:
if c == NULL then nexttiled() will return NULL as well, so we enter this
branch:
if (c == nexttiled(selmon->clients))
in here the !c check fails and the function returns before calling pop()
if (!c || !(c = nexttiled(c->next)))
return;
however, none of this was needed. we can simply return early if c was NULL.
Also `c` is set to `selmon->sel` so we can use `c` in the first check
instead which makes things shorter.
Diffstat (limited to 'dwm.c%252525252525253fid%252525252525253d6d6e0ea56f6784dd35173eff2d17c259b1588d0e%2525252525253fid%2525252525253d6d6e0ea56f6784dd35173eff2d17c259b1588d0e&id2%2525252525253db0529c654b3dd5cc5c2ce635e5a1589d276ff0eb%25252525253fid%25252525253d6d6e0ea56f6784dd35173eff2d17c259b1588d0e%252525253fid%252525253da859676ead17017bbe81b4989b2f2e0b00a0b4ba%2525253fid%2525253da859676ead17017bbe81b4989b2f2e0b00a0b4ba%25253fid%25253de0dee911455cee739a5b05a994828f4a37a2764d%253fid%253de0dee911455cee739a5b05a994828f4a37a2764d%3fid%3de0dee911455cee739a5b05a994828f4a37a2764d?id=5e76e7e21da042c493c59235ca82d7275f20a7e4')
0 files changed, 0 insertions, 0 deletions