From fbe39975cfcce5b297cd54ff2952dd6cecebe3eb Mon Sep 17 00:00:00 2001 From: Jens Arnold Date: Sat, 11 Apr 2009 23:07:02 +0000 Subject: Slightly more compact boundary check. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20691 a1c6a512-1295-4272-9138-f99709370657 --- apps/gui/scrollbar.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/apps/gui/scrollbar.c b/apps/gui/scrollbar.c index 8a0b885c4b..0f2a485b32 100644 --- a/apps/gui/scrollbar.c +++ b/apps/gui/scrollbar.c @@ -96,10 +96,8 @@ void gui_scrollbar_draw(struct screen * screen, int x, int y, /* Boundary check to make sure that height is reasonable, otherwise nothing * to do */ - if(height<2 || width<2) - { + if ((inner_wd | inner_ht) < 0) return; - } if (flags & HORIZONTAL) inner_len = inner_wd; -- cgit v1.2.3