summaryrefslogtreecommitdiff
path: root/transient.c
diff options
context:
space:
mode:
authorNRK <nrk@disroot.org>2022-08-06 04:27:13 +0600
committerrafa_99 <raroma09@gmail.com>2022-08-06 15:32:00 +0100
commitf0792e04a4ae7f3c10940e138046fea123b8b191 (patch)
treed3cc58579eaeeef387ecaf91942de9e300f98441 /transient.c
parentb32f88d210dda0b49971c1ee992d5be9343d2a04 (diff)
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 'transient.c')
0 files changed, 0 insertions, 0 deletions