Bug 1240290 - Follow-up: Reformat. rs=reformat DONTBUILD
authorJorg K <jorgk@jorgk.com>
Fri, 20 Sep 2019 01:02:13 +0200
changeset 36884 6542dc3163386308ccb3bd4db7e914d2eb402844
parent 36883 5f3a5f96cc9b1b4f52f652e46fd433c4c08717ec
child 36885 aa8107b682ba6fd44e9b91e49ac8846d84bf5abb
push id395
push userclokep@gmail.com
push dateMon, 02 Dec 2019 19:38:57 +0000
reviewersreformat
bugs1240290
Bug 1240290 - Follow-up: Reformat. rs=reformat DONTBUILD
mailnews/mime/src/mimecms.cpp
mailnews/mime/src/mimecryp.cpp
mailnews/mime/src/mimeeobj.cpp
mailnews/mime/src/mimeeobj.h
mailnews/mime/src/mimemsig.cpp
--- a/mailnews/mime/src/mimecms.cpp
+++ b/mailnews/mime/src/mimecms.cpp
@@ -148,30 +148,28 @@ bool MimeEncOrMP_CMS_signed_p(MimeObject
     MimeCMSdata *data = (MimeCMSdata *)enc->crypto_closure;
     if (!data || !data->content_info) return false;
     data->content_info->ContentIsSigned(&is_signed);
     return is_signed;
   }
   return false;
 }
 
-bool MimeAnyParentCMSEncrypted(MimeObject *obj)
-{
+bool MimeAnyParentCMSEncrypted(MimeObject *obj) {
   MimeObject *o2 = obj;
   while (o2 && o2->parent) {
     if (MimeEncryptedCMS_encrypted_p(o2->parent)) {
       return true;
     }
     o2 = o2->parent;
   }
   return false;
 }
 
-bool MimeAnyParentCMSSigned(MimeObject *obj)
-{
+bool MimeAnyParentCMSSigned(MimeObject *obj) {
   MimeObject *o2 = obj;
   while (o2 && o2->parent) {
     if (MimeEncOrMP_CMS_signed_p(o2->parent)) {
       return true;
     }
     o2 = o2->parent;
   }
   return false;
@@ -534,17 +532,17 @@ static void *MimeCMS_init(MimeObject *ob
   return data;
 }
 
 static int MimeCMS_write(const char *buf, int32_t buf_size, void *closure) {
   MimeCMSdata *data = (MimeCMSdata *)closure;
   nsresult rv;
 
   if (!data || !data->output_fn || !data->decoder_context) return -1;
-  
+
   if (!data->decoding_failed && !data->skip_content) {
     PR_SetError(0, 0);
     rv = data->decoder_context->Update(buf, buf_size);
     data->decoding_failed = NS_FAILED(rv);
   }
 
   return 0;
 }
@@ -643,21 +641,23 @@ static int MimeCMS_eof(void *crypto_clos
   if (data->decoding_failed) status = nsICMSMessageErrors::GENERAL_ERROR;
 
   if (data->skip_content) {
     // Skipping content means, we detected a forbidden combination
     // of CMS objects, so let's make sure we replace the parent status
     // with a bad status.
     if (data->any_parent_is_signed_p) {
       data->smimeHeaderSink->SignedStatus(aRelativeNestLevel,
-        nsICMSMessageErrors::GENERAL_ERROR, nullptr, data->url);
+                                          nsICMSMessageErrors::GENERAL_ERROR,
+                                          nullptr, data->url);
     }
     if (data->any_parent_is_encrypted_p) {
-      data->smimeHeaderSink->EncryptionStatus(aRelativeNestLevel,
-        nsICMSMessageErrors::GENERAL_ERROR, nullptr, data->url);
+      data->smimeHeaderSink->EncryptionStatus(
+          aRelativeNestLevel, nsICMSMessageErrors::GENERAL_ERROR, nullptr,
+          data->url);
     }
     return 0;
   }
 
   if (!data->content_info) {
     if (!data->decoded_bytes) {
       // We were unable to decode any data.
       status = nsICMSMessageErrors::GENERAL_ERROR;
--- a/mailnews/mime/src/mimecryp.cpp
+++ b/mailnews/mime/src/mimecryp.cpp
@@ -347,18 +347,17 @@ static int MimeEncrypted_emit_buffered_c
 
    Also, don't emit anything if the enclosed object is itself a signed
    object -- in the case of an encrypted object which contains a signed
    object, we only emit the HTML once (since the normal way of encrypting
    and signing is to nest the signature inside the crypto envelope.)
    */
   if (enc->crypto_closure && obj->options &&
       obj->options->headers != MimeHeadersCitation &&
-      obj->options->write_html_p && obj->options->output_fn)
-  {
+      obj->options->write_html_p && obj->options->output_fn) {
     /* Now that we have written out the crypto stamp, the outermost header
      block is well and truly closed.  If this is in fact the outermost
      message, then run the post_header_html_fn now.
      */
     if (obj->options && obj->options->state &&
         obj->options->generate_post_header_html_fn &&
         !obj->options->state->post_header_html_run_p) {
       MimeHeaders *outer_headers = nullptr;
--- a/mailnews/mime/src/mimeeobj.cpp
+++ b/mailnews/mime/src/mimeeobj.cpp
@@ -203,12 +203,13 @@ static bool MimeExternalObject_displayab
   return false;
 }
 
 #undef MIME_SUPERCLASS
 #define MIME_SUPERCLASS mimeExternalObjectClass
 MimeDefClass(MimeSuppressedCrypto, MimeSuppressedCryptoClass,
              mimeSuppressedCryptoClass, &MIME_SUPERCLASS);
 
-static int MimeSuppressedCryptoClassInitialize(MimeSuppressedCryptoClass *clazz) {
+static int MimeSuppressedCryptoClassInitialize(
+    MimeSuppressedCryptoClass *clazz) {
   MimeExternalObjectClass *lclass = (MimeExternalObjectClass *)clazz;
   return MimeExternalObjectClassInitialize(lclass);
 }
--- a/mailnews/mime/src/mimeeobj.h
+++ b/mailnews/mime/src/mimeeobj.h
@@ -26,27 +26,25 @@ extern "C" MimeExternalObjectClass mimeE
 
 struct MimeExternalObject {
   MimeLeaf leaf;
 };
 
 #define MimeExternalObjectClassInitializer(ITYPE, CSUPER) \
   { MimeLeafClassInitializer(ITYPE, CSUPER) }
 
-
 typedef struct MimeSuppressedCryptoClass MimeSuppressedCryptoClass;
 typedef struct MimeSuppressedCrypto MimeSuppressedCrypto;
 
 struct MimeSuppressedCryptoClass {
   MimeExternalObjectClass eobj;
 };
 
 extern "C" MimeSuppressedCryptoClass mimeSuppressedCryptoClass;
 
 struct MimeSuppressedCrypto {
   MimeExternalObject eobj;
 };
 
 #define MimeSuppressedCryptoClassInitializer(ITYPE, CSUPER) \
   { MimeExternalObjectClassInitializer(ITYPE, CSUPER) }
 
-
 #endif /* _MIMEEOBJ_H_ */
--- a/mailnews/mime/src/mimemsig.cpp
+++ b/mailnews/mime/src/mimemsig.cpp
@@ -649,17 +649,17 @@ static int MimeMultipartSigned_emit_chil
   NS_ASSERTION(cont->nchildren == 1, "should only have one child");
   if (cont->nchildren != 1) return -1;
   body = cont->children[0];
   NS_ASSERTION(body, "missing body");
   if (!body) return -1;
 
   if (mime_typep(body, (MimeObjectClass *)&mimeSuppressedCryptoClass)) {
     ((MimeMultipartSignedClass *)obj->clazz)
-      ->crypto_notify_suppressed_child(sig->crypto_closure);
+        ->crypto_notify_suppressed_child(sig->crypto_closure);
   }
 
 #ifdef MIME_DRAFTS
   if (body->options->decompose_file_p) {
     body->options->signed_p = true;
     if (!mime_typep(body, (MimeObjectClass *)&mimeMultipartClass) &&
         body->options->decompose_file_init_fn)
       body->options->decompose_file_init_fn(body->options->stream_closure,