From b9378e45442224e9a25f3bb2e11beef8a3419b01 Mon Sep 17 00:00:00 2001
From: Matthieu Schaller <matthieu.schaller@durham.ac.uk>
Date: Tue, 24 Jan 2017 17:34:59 +0000
Subject: [PATCH] Code formatting

---
 examples/main.c |  3 ++-
 src/engine.c    |  6 +++---
 src/part.c      | 13 ++++++-------
 src/runner.c    | 12 +++++++-----
 4 files changed, 18 insertions(+), 16 deletions(-)

diff --git a/examples/main.c b/examples/main.c
index 9b2ea7f154..63753bdfce 100644
--- a/examples/main.c
+++ b/examples/main.c
@@ -422,7 +422,8 @@ int main(int argc, char *argv[]) {
   long long N_total[3] = {0, 0, 0};
 #if defined(WITH_MPI)
   long long N_long[3] = {Ngas, Ngpart, Nspart};
-  MPI_Reduce(&N_long, &N_total, 3, MPI_LONG_LONG_INT, MPI_SUM, 0, MPI_COMM_WORLD);
+  MPI_Reduce(&N_long, &N_total, 3, MPI_LONG_LONG_INT, MPI_SUM, 0,
+             MPI_COMM_WORLD);
 #else
   N_total[0] = Ngas;
   N_total[1] = Ngpart;
diff --git a/src/engine.c b/src/engine.c
index 7c5e1842ec..9ba0677564 100644
--- a/src/engine.c
+++ b/src/engine.c
@@ -444,7 +444,7 @@ void engine_redistribute(struct engine *e) {
     }
   }
 
-  /* Each node knows how many parts, sparts and gparts will be transferred 
+  /* Each node knows how many parts, sparts and gparts will be transferred
      to every other node. We can start preparing to receive data */
 
   /* Get the new number of parts and gparts for this node */
@@ -2904,8 +2904,8 @@ void engine_init_particles(struct engine *e, int flag_entropy_ICs) {
 
 #ifdef SWIFT_DEBUG_CHECKS
   space_check_timesteps(e->s);
-  part_verify_links(e->s->parts, e->s->gparts, e->s->sparts,
-		    e->s->nr_parts, e->s->nr_gparts, e->s->nr_sparts);
+  part_verify_links(e->s->parts, e->s->gparts, e->s->sparts, e->s->nr_parts,
+                    e->s->nr_gparts, e->s->nr_sparts);
 #endif
 
   /* Ready to go */
diff --git a/src/part.c b/src/part.c
index 3f836ab27e..3edd0a92d5 100644
--- a/src/part.c
+++ b/src/part.c
@@ -140,7 +140,7 @@ void part_verify_links(struct part *parts, struct gpart *gparts,
         error("Linked particles are not at the same position !");
 
       /* Check that the particles are at the same time */
-      if(gparts[k].time_bin != part->time_bin)
+      if (gparts[k].time_bin != part->time_bin)
         error("Linked particles are not at the same time !");
     }
 
@@ -162,7 +162,7 @@ void part_verify_links(struct part *parts, struct gpart *gparts,
         error("Linked particles are not at the same position !");
 
       /* Check that the particles are at the same time */
-      if(gparts[k].time_bin != spart->time_bin)
+      if (gparts[k].time_bin != spart->time_bin)
         error("Linked particles are not at the same time !");
     }
   }
@@ -186,7 +186,7 @@ void part_verify_links(struct part *parts, struct gpart *gparts,
 
       /* Check that the particles are at the same time */
       if (parts[k].time_bin != parts[k].gpart->time_bin)
-	error("Linked particles are not at the same time !");
+        error("Linked particles are not at the same time !");
     }
   }
 
@@ -206,10 +206,9 @@ void part_verify_links(struct part *parts, struct gpart *gparts,
             sparts[k].x[2] != sparts[k].gpart->x[2])
           error("Linked particles are not at the same position !");
 
-	/* Check that the particles are at the same time */
-	if (sparts[k].time_bin != sparts[k].gpart->time_bin)
-	  error("Linked particles are not at the same time !");
-      
+        /* Check that the particles are at the same time */
+        if (sparts[k].time_bin != sparts[k].gpart->time_bin)
+          error("Linked particles are not at the same time !");
       }
     }
   }
diff --git a/src/runner.c b/src/runner.c
index 2d9f760dbc..b3cbb1a58b 100644
--- a/src/runner.c
+++ b/src/runner.c
@@ -1339,9 +1339,9 @@ void runner_do_recv_cell(struct runner *r, struct cell *c, int timer) {
 #ifdef WITH_MPI
 
   const struct part *restrict parts = c->parts;
-  //const struct gpart *restrict gparts = c->gparts;
+  // const struct gpart *restrict gparts = c->gparts;
   const size_t nr_parts = c->count;
-  //const size_t nr_gparts = c->gcount;
+  // const size_t nr_gparts = c->gcount;
   const integertime_t ti_current = r->e->ti_current;
 
   TIMER_TIC;
@@ -1388,9 +1388,11 @@ void runner_do_recv_cell(struct runner *r, struct cell *c, int timer) {
   }
 
 #ifdef SWIFT_DEBUG_CHECKS
-  if(ti_end_min < ti_current)
-    error("Received a cell at an incorrect time c->ti_end_min=%lld, e->ti_current=%lld.",
-	  ti_end_min, ti_current);
+  if (ti_end_min < ti_current)
+    error(
+        "Received a cell at an incorrect time c->ti_end_min=%lld, "
+        "e->ti_current=%lld.",
+        ti_end_min, ti_current);
 #endif
 
   /* ... and store. */
-- 
GitLab