diff options
author | Nicholas Marriott <nicm@openbsd.org> | 2009-07-20 07:31:10 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@openbsd.org> | 2009-07-20 07:31:10 +0000 |
commit | 73732ffa0585faacb53b6f7bb9f741c54251dd6d (patch) | |
tree | e14590b3d00f0f24aa3f9ddb174cc6fff1ec5317 /layout-set.c | |
parent | ff2cc0e38709b285293fd38ab720f4eb785ce361 (diff) |
Kill some dead stores and fix a null pointer deref, found by clang.
Diffstat (limited to 'layout-set.c')
-rw-r--r-- | layout-set.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/layout-set.c b/layout-set.c index ae99f6ff..4433d0cf 100644 --- a/layout-set.c +++ b/layout-set.c @@ -122,10 +122,9 @@ layout_set_even_h(struct window *w) return; /* How many can we fit? */ - if (w->sx / n < PANE_MINIMUM + 1) { + if (w->sx / n < PANE_MINIMUM + 1) width = PANE_MINIMUM + 1; - n = UINT_MAX; - } else + else width = w->sx / n; /* Free the old root and construct a new. */ @@ -177,10 +176,9 @@ layout_set_even_v(struct window *w) return; /* How many can we fit? */ - if (w->sy / n < PANE_MINIMUM + 1) { + if (w->sy / n < PANE_MINIMUM + 1) height = PANE_MINIMUM + 1; - n = UINT_MAX; - } else + else height = w->sy / n; /* Free the old root and construct a new. */ |