[PATCH 1/6] cli/new: use the same style for fs entry loops

Subject: [PATCH 1/6] cli/new: use the same style for fs entry loops

Date: Fri, 1 Sep 2017 18:53:06 +0300

To: notmuch@notmuchmail.org

Cc:

From: Jani Nikula


Just to please the eyes. No functional changes.
---
 notmuch-new.c | 11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)

diff --git a/notmuch-new.c b/notmuch-new.c
index e011788da590..c6a741fefa03 100644
--- a/notmuch-new.c
+++ b/notmuch-new.c
@@ -443,10 +443,7 @@ add_files (notmuch_database_t *notmuch,
     /* Pass 1: Recurse into all sub-directories. */
     is_maildir = _entries_resemble_maildir (path, fs_entries, num_fs_entries);
 
-    for (i = 0; i < num_fs_entries; i++) {
-	if (interrupted)
-	    break;
-
+    for (i = 0; i < num_fs_entries && ! interrupted; i++) {
 	entry = fs_entries[i];
 
 	/* Ignore any files/directories the user has configured to
@@ -514,11 +511,7 @@ add_files (notmuch_database_t *notmuch,
     }
 
     /* Pass 2: Scan for new files, removed files, and removed directories. */
-    for (i = 0; i < num_fs_entries; i++)
-    {
-	if (interrupted)
-	    break;
-
+    for (i = 0; i < num_fs_entries && ! interrupted; i++) {
         entry = fs_entries[i];
 
 	/* Ignore files & directories user has configured to be ignored */
-- 
2.11.0

_______________________________________________
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch

Thread: