]> granicus.if.org Git - neomutt/commitdiff
sort: sidebar functions
authorRichard Russon <rich@flatcap.org>
Mon, 30 Nov 2015 14:37:10 +0000 (14:37 +0000)
committerRichard Russon <rich@flatcap.org>
Sun, 6 Mar 2016 00:44:21 +0000 (00:44 +0000)
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

index 9ce8303e49bda05a2449038b5bef78d861379b3b..90add9cfe2ac60fd92588928cc4c0c90b764d5d2 100644 (file)
--- 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;
        }
 }