From 69776768d2e6fe20bf2346d164e37420f553a2d7 Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Thu, 23 Apr 2015 09:46:04 +0100 Subject: Remove duplicate branch in relative position handling. --- render/layout.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'render') diff --git a/render/layout.c b/render/layout.c index 67e3219ca..9b479da17 100644 --- a/render/layout.c +++ b/render/layout.c @@ -4493,14 +4493,14 @@ void layout_compute_relative_offset(struct box *box, int *x, int *y) assert(left == -right); - if (top == AUTO && bottom == AUTO) + if (top == AUTO && bottom == AUTO) { top = bottom = 0; - else if (top == AUTO) + } else if (top == AUTO) { top = -bottom; - else if (bottom == AUTO) - bottom = -top; - else + } else { + /* bottom is AUTO, or neither are AUTO */ bottom = -top; + } #ifdef LAYOUT_DEBUG LOG(("left %i, right %i, top %i, bottom %i", left, right, top, bottom)); -- cgit v1.2.3