commit 72891604020393da9c2f98095cc28d646c83a941 from: Marcel Rodrigues date: Sun Jun 14 15:36:34 2015 UTC Remove some unnecessary parentheses. commit - 718d45e4ad51ecd98bbb50b389d554ca16f48cdf commit + 72891604020393da9c2f98095cc28d646c83a941 blob - a71418f53e7f7773173fcc8cbc332cf20bd75879 blob + 3f1fdbb322368e754a0ce15f25e6d8b57b4e71d6 --- rover.c +++ rover.c @@ -408,11 +408,11 @@ update_view() mvwhline(rover.window, i + 1, 1, ' ', COLS - 2); if (rover.nfiles > HEIGHT) { int center, height; - center = (SCROLL + (HEIGHT / 2)) * HEIGHT / rover.nfiles; + center = (SCROLL + HEIGHT / 2) * HEIGHT / rover.nfiles; height = (HEIGHT-1) * HEIGHT / rover.nfiles; if (!height) height = 1; wcolor_set(rover.window, RVC_SCROLLBAR, NULL); - mvwvline(rover.window, center-(height/2)+1, COLS-1, RVS_SCROLLBAR, height); + mvwvline(rover.window, center-height/2+1, COLS-1, RVS_SCROLLBAR, height); } STATUS[0] = FLAGS & SHOW_FILES ? 'F' : ' '; STATUS[1] = FLAGS & SHOW_DIRS ? 'D' : ' '; @@ -561,7 +561,7 @@ try_to_sel(const char *target) while ((ESEL+1) < rover.nfiles && strcoll(ENAME(ESEL), target) < 0) ESEL++; if (rover.nfiles > HEIGHT) { - SCROLL = ESEL - (HEIGHT / 2); + SCROLL = ESEL - HEIGHT / 2; SCROLL = MIN(MAX(SCROLL, 0), rover.nfiles - HEIGHT); } }