summaryrefslogtreecommitdiffstats
path: root/layout-set.c
diff options
context:
space:
mode:
authorTiago Cunha <tcunha@gmx.com>2009-07-20 15:51:32 +0000
committerTiago Cunha <tcunha@gmx.com>2009-07-20 15:51:32 +0000
commit62017452e958cd6fad19d5ca9c7eb56b63bf90a0 (patch)
tree82190dfe236317bd1860c26a8b4b97250bbc9afc /layout-set.c
parent16f424d25dc843b70b17b7993ea0bdebcbda1c5e (diff)
Sync OpenBSD patchset 145:
Kill some dead stores and fix a null pointer deref, found by clang.
Diffstat (limited to 'layout-set.c')
-rw-r--r--layout-set.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/layout-set.c b/layout-set.c
index 46d2e1ef..0c04577e 100644
--- a/layout-set.c
+++ b/layout-set.c
@@ -1,4 +1,4 @@
-/* $Id: layout-set.c,v 1.1 2009-07-20 15:42:05 tcunha Exp $ */
+/* $Id: layout-set.c,v 1.2 2009-07-20 15:51:32 tcunha Exp $ */
/*
* Copyright (c) 2009 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -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. */