From a67a6b37bf10ffe6bb35beedc25508b10a0e2b3c Mon Sep 17 00:00:00 2001 From: Richard Russon Date: Mon, 30 Nov 2015 14:37:10 +0000 Subject: [PATCH] sort: sidebar functions NOTE: this patch does NOT make any code changes. It simply rearranges entire functions. Reorder the functions in sidebar.c Put the static (helper) functions together. --- sidebar.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/sidebar.c b/sidebar.c index 9ce8303e4..90add9cfe 100644 --- a/sidebar.c +++ b/sidebar.c @@ -236,6 +236,7 @@ make_sidebar_entry (char *buf, unsigned int buflen, int width, char *box, } } + void draw_sidebar (void) { @@ -538,17 +539,12 @@ set_curbuffy (char *path) if (!path || !b) return; - while (1) { + for (; b; b = b->next) { if (!strcmp (b->path, path) || !strcmp (b->realpath, path)) { CurBuffy = b; break; } - - if (b->next) - b = b->next; - else - break; } } -- 2.50.0