]> granicus.if.org Git - neomutt/commitdiff
clang-format
authorRichard Russon <rich@flatcap.org>
Fri, 27 Oct 2017 13:18:23 +0000 (14:18 +0100)
committerRichard Russon <rich@flatcap.org>
Fri, 27 Oct 2017 15:20:42 +0000 (16:20 +0100)
14 files changed:
envelope.c
init.c
lib/date.c
lib/file.c
lib/string.c
mutt_tags.c
ncrypt/crypt_mod.c
newsrc.c
nntp.c
pop_lib.c
rfc2047.c
sendlib.c
smtp.c
url.c

index aa4c9539d24fbea9a78e957dabd04b4de9801fdd..9c3677bbcd87e59361817a0d227a61e173aecc34 100644 (file)
@@ -24,8 +24,8 @@
 #include <stddef.h>
 #include "lib/buffer.h"
 #include "lib/memory.h"
-#include "envelope.h"
 #include "lib/queue.h"
+#include "envelope.h"
 #include "rfc822.h"
 
 struct Envelope *mutt_new_envelope(void)
diff --git a/init.c b/init.c
index 3cc762fe653a2601f159e69a3f30e9d097542f04..d71bfb26651d750efa9a764ba4e25b492f984710 100644 (file)
--- a/init.c
+++ b/init.c
@@ -396,10 +396,9 @@ int mutt_option_set(const struct Option *val, struct Buffer *err)
               struct Envelope *e = Context->hdrs[i]->env;
               if (e && e->subject)
               {
-                e->real_subj =
-                    (regexec(ReplyRegexp.regex, e->subject, 1, pmatch, 0)) ?
-                        e->subject :
-                        e->subject + pmatch[0].rm_eo;
+                e->real_subj = (regexec(ReplyRegexp.regex, e->subject, 1, pmatch, 0)) ?
+                                   e->subject :
+                                   e->subject + pmatch[0].rm_eo;
               }
             }
           }
@@ -2815,10 +2814,9 @@ static int parse_set(struct Buffer *tmp, struct Buffer *s, unsigned long data,
             struct Envelope *e = Context->hdrs[i]->env;
             if (e && e->subject)
             {
-              e->real_subj =
-                  (regexec(ReplyRegexp.regex, e->subject, 1, pmatch, 0)) ?
-                      e->subject :
-                      e->subject + pmatch[0].rm_eo;
+              e->real_subj = (regexec(ReplyRegexp.regex, e->subject, 1, pmatch, 0)) ?
+                                 e->subject :
+                                 e->subject + pmatch[0].rm_eo;
             }
           }
         }
index f46e0226fe9f2a7a2f170418b18216f54efdae50..1ae309a921539b3a58113ee96935a2dc7e0d1ccd 100644 (file)
@@ -619,9 +619,9 @@ int imap_make_date(char *buf, size_t buflen, time_t timestamp)
 
   tz /= 60;
 
-  return snprintf(buf, buflen, "%02d-%s-%d %02d:%02d:%02d %+03d%02d",
-           tm->tm_mday, Months[tm->tm_mon], tm->tm_year + 1900, tm->tm_hour,
-           tm->tm_min, tm->tm_sec, (int) tz / 60, (int) abs((int) tz) % 60);
+  return snprintf(buf, buflen, "%02d-%s-%d %02d:%02d:%02d %+03d%02d", tm->tm_mday,
+                  Months[tm->tm_mon], tm->tm_year + 1900, tm->tm_hour, tm->tm_min,
+                  tm->tm_sec, (int) tz / 60, (int) abs((int) tz) % 60);
 }
 
 /**
@@ -676,4 +676,3 @@ time_t imap_parse_date(char *s)
 
   return (mutt_mktime(&t, 0) + tz);
 }
-
index 48db318545ec916cd73d2261c67fc179d5958fb0..a09055d05af470241298353d3476c94d91fd7a53 100644 (file)
@@ -224,7 +224,7 @@ void mutt_unlink(const char *s)
   struct stat sb, sb2;
   char buf[2048];
 
-/* Defend against symlink attacks */
+  /* Defend against symlink attacks */
 
   if ((lstat(s, &sb) == 0) && S_ISREG(sb.st_mode))
   {
index 4091b5614ef06354a30aab93359ebd244deb9632..2d78065b194f99860fce2eaf2f97b27c508119ed 100644 (file)
@@ -745,4 +745,3 @@ int imap_wordcasecmp(const char *a, const char *b)
 
   return mutt_strcasecmp(a, tmp);
 }
-
index 29cc4386a9b19248a5929227ad35f645a72fcd99..ed9d86bc0eabb07ce7d0692cdb479ed86e0c21a5 100644 (file)
 
 #include "config.h"
 #include "lib/hash.h"
+#include "lib/queue.h"
 #include "lib/string2.h"
 #include "globals.h"
 #include "mutt_tags.h"
-#include "lib/queue.h"
 
 /**
  * driver_tags_free - Free tags from a header
index d59133c304d4fa00772b2647d293ff5d38ec3cb2..f809b24793b5832586f2c40a56d724805b4bcea9 100644 (file)
@@ -22,8 +22,8 @@
 
 #include "config.h"
 #include "lib/lib.h"
-#include "crypt_mod.h"
 #include "lib/queue.h"
+#include "crypt_mod.h"
 
 /**
  * struct CryptModule - A crypto plugin module
index 159f9645cc09c3ba66ceb21c0bf3a844292d06d0..8309514a590375c101e7809c95dd266044d33682 100644 (file)
--- a/newsrc.c
+++ b/newsrc.c
@@ -954,8 +954,7 @@ struct NntpServer *nntp_select_server(char *server, bool leave_lock)
   acct.type = MUTT_ACCT_TYPE_NNTP;
   snprintf(file, sizeof(file), "%s%s", strstr(server, "://") ? "" : "news://", server);
   if (url_parse(&url, file) < 0 || (url.path && *url.path) ||
-      !(url.scheme == U_NNTP || url.scheme == U_NNTPS) ||
-      !url.host ||
+      !(url.scheme == U_NNTP || url.scheme == U_NNTPS) || !url.host ||
       mutt_account_fromurl(&acct, &url) < 0)
   {
     url_free(&url);
diff --git a/nntp.c b/nntp.c
index 1dbde534f3adb68866ffdea84ecbf9104f992705..2d4e446c57d11f22e0ea9c245ea4d4e6f9c2f98f 100644 (file)
--- a/nntp.c
+++ b/nntp.c
@@ -1453,7 +1453,8 @@ static int nntp_open_mailbox(struct Context *ctx)
   struct Url url;
 
   strfcpy(buf, ctx->path, sizeof(buf));
-  if (url_parse(&url, buf) < 0 || !url.host || !url.path || !(url.scheme == U_NNTP || url.scheme == U_NNTPS))
+  if (url_parse(&url, buf) < 0 || !url.host || !url.path ||
+      !(url.scheme == U_NNTP || url.scheme == U_NNTPS))
   {
     url_free(&url);
     mutt_error(_("%s is an invalid newsgroup specification!"), ctx->path);
index 827eb0d78187de2ffa9f9202a607c3548dd241f5..ed7f5401e277ebc378432137c61f5d164357ebf8 100644 (file)
--- a/pop_lib.c
+++ b/pop_lib.c
@@ -67,7 +67,8 @@ int pop_parse_path(const char *path, struct Account *acct)
   c = safe_strdup(path);
   url_parse(&url, c);
 
-  if ((url.scheme != U_POP && url.scheme != U_POPS) || !url.host || mutt_account_fromurl(acct, &url) < 0)
+  if ((url.scheme != U_POP && url.scheme != U_POPS) || !url.host ||
+      mutt_account_fromurl(acct, &url) < 0)
   {
     url_free(&url);
     FREE(&c);
index b73e93d6af7b8643a96998b4e974adb941f215d0..963c657f30a3bcc784cd8aa84a8dc908206cf88a 100644 (file)
--- a/rfc2047.c
+++ b/rfc2047.c
@@ -576,7 +576,7 @@ static int rfc2047_encode(ICONV_CONST char *d, size_t dlen, int col, const char
     /* Add to output buffer. */
     const char *line_break = "\n\t";
     const int lb_len = 2; /* strlen(line_break) */
-      
+
     if ((bufpos + wlen + lb_len) > buflen)
     {
       buflen = bufpos + wlen + lb_len;
index ab1779655ffb8fa6a5cb008b8bc872556859e3a4..ecbf37e1fc656f10f891593123af42663e19e407 100644 (file)
--- a/sendlib.c
+++ b/sendlib.c
@@ -423,7 +423,8 @@ int mutt_write_mime_header(struct Body *a, FILE *f)
 
 static bool write_as_text_part(struct Body *b)
 {
-  return (mutt_is_text_part(b) || ((WithCrypto & APPLICATION_PGP) && mutt_is_application_pgp(b)));
+  return (mutt_is_text_part(b) ||
+          ((WithCrypto & APPLICATION_PGP) && mutt_is_application_pgp(b)));
 }
 
 int mutt_write_mime_body(struct Body *a, FILE *f)
diff --git a/smtp.c b/smtp.c
index 9a9b615dcf62d3a06b0cfa0dbb387c4c39597378..05493e0729705beee80025ab7a5bba2d562355fc 100644 (file)
--- a/smtp.c
+++ b/smtp.c
@@ -292,8 +292,7 @@ static int smtp_fill_account(struct Account *account)
 
   urlstr = safe_strdup(SmtpUrl);
   url_parse(&url, urlstr);
-  if ((url.scheme != U_SMTP && url.scheme != U_SMTPS) ||
-      !url.host ||
+  if ((url.scheme != U_SMTP && url.scheme != U_SMTPS) || !url.host ||
       mutt_account_fromurl(account, &url) < 0)
   {
     url_free(&url);
diff --git a/url.c b/url.c
index 3151be55722d0ffef12f2b2bf16b5b8aa43a280f..c22c774f7da62156caaf746a0f65a69d4f3a82fd 100644 (file)
--- a/url.c
+++ b/url.c
@@ -97,7 +97,6 @@ enum UrlScheme url_check_scheme(const char *s)
     return (enum UrlScheme) i;
 }
 
-
 static int parse_query_string(struct Url *u, char *src)
 {
   struct UrlQueryString *qs = NULL;
@@ -134,7 +133,6 @@ static int parse_query_string(struct Url *u, char *src)
   return 0;
 }
 
-
 /**
  * url_parse - Fill in Url
  * @param u   Url where the result is stored
@@ -226,7 +224,6 @@ int url_parse(struct Url *u, char *src)
   else
     u->port = 0;
 
-
   if (mutt_strlen(src) != 0)
   {
     u->host = src;
@@ -252,11 +249,11 @@ void url_free(struct Url *u)
   struct UrlQueryString *np = STAILQ_FIRST(&u->query_strings), *next = NULL;
   while (np)
   {
-      next = STAILQ_NEXT(np, entries);
-      /* NOTE(sileht): We don't free members, they will be freed when
-       * the src char* passed to url_parse() is freed */
-      FREE(&np);
-      np = next;
+    next = STAILQ_NEXT(np, entries);
+    /* NOTE(sileht): We don't free members, they will be freed when
+     * the src char* passed to url_parse() is freed */
+    FREE(&np);
+    np = next;
   }
   STAILQ_INIT(&u->query_strings);
 }