From e9d7520bb1a847ea16b456f98318fc453eae55c5 Mon Sep 17 00:00:00 2001
From: Matthieu Schaller <matthieu.schaller@durham.ac.uk>
Date: Tue, 20 Dec 2016 17:38:16 +0100
Subject: [PATCH] Code formatting

---
 src/cell.c   | 16 ++++++++--------
 src/engine.c | 26 +++++++++++++-------------
 src/runner.c | 15 ++++++++-------
 3 files changed, 29 insertions(+), 28 deletions(-)

diff --git a/src/cell.c b/src/cell.c
index e8f8cbffb6..f0668f48f0 100644
--- a/src/cell.c
+++ b/src/cell.c
@@ -907,10 +907,10 @@ int cell_unskip_tasks(struct cell *c, struct scheduler *s) {
         if (l == NULL) error("Missing link to send_xv task.");
         scheduler_activate(s, l->t);
 
-	if(cj->super->drift) 
-	  scheduler_activate(s, cj->super->drift);
-	else
-	  error("Drift task missing !");
+        if (cj->super->drift)
+          scheduler_activate(s, cj->super->drift);
+        else
+          error("Drift task missing !");
 
         for (l = cj->send_rho; l != NULL && l->t->cj->nodeID != ci->nodeID;
              l = l->next)
@@ -939,10 +939,10 @@ int cell_unskip_tasks(struct cell *c, struct scheduler *s) {
         if (l == NULL) error("Missing link to send_xv task.");
         scheduler_activate(s, l->t);
 
-	if(ci->super->drift) 
-	  scheduler_activate(s, ci->super->drift);
-	else
-	  error("Drift task missing !");
+        if (ci->super->drift)
+          scheduler_activate(s, ci->super->drift);
+        else
+          error("Drift task missing !");
 
         for (l = ci->send_rho; l != NULL && l->t->cj->nodeID != cj->nodeID;
              l = l->next)
diff --git a/src/engine.c b/src/engine.c
index 82ff7b595e..60ca48bd38 100644
--- a/src/engine.c
+++ b/src/engine.c
@@ -674,10 +674,10 @@ void engine_addtasks_send(struct engine *e, struct cell *ci, struct cell *cj,
 
     /* Create the tasks and their dependencies? */
     if (t_xv == NULL) {
-      
-      if(ci->super->drift == NULL) 
-	ci->super->drift = scheduler_addtask(s, task_type_drift, task_subtype_none, 0, 0,
-					     ci->super, NULL, 0);
+
+      if (ci->super->drift == NULL)
+        ci->super->drift = scheduler_addtask(
+            s, task_type_drift, task_subtype_none, 0, 0, ci->super, NULL, 0);
 
       t_xv = scheduler_addtask(s, task_type_send, task_subtype_none,
                                4 * ci->tag, 0, ci, cj, 0);
@@ -2067,11 +2067,11 @@ void engine_marktasks_mapper(void *map_data, int num_elements,
         if (l == NULL) error("Missing link to send_xv task.");
         scheduler_activate(s, l->t);
 
-	if(cj->super->drift) 
-	  scheduler_activate(s, cj->super->drift);
-	else
-	  error("Drift task missing !");
-	
+        if (cj->super->drift)
+          scheduler_activate(s, cj->super->drift);
+        else
+          error("Drift task missing !");
+
         for (l = cj->send_rho; l != NULL && l->t->cj->nodeID != ci->nodeID;
              l = l->next)
           ;
@@ -2099,10 +2099,10 @@ void engine_marktasks_mapper(void *map_data, int num_elements,
         if (l == NULL) error("Missing link to send_xv task.");
         scheduler_activate(s, l->t);
 
-	if(ci->super->drift) 
-	  scheduler_activate(s, ci->super->drift);
-	else
-	  error("Drift task missing !");
+        if (ci->super->drift)
+          scheduler_activate(s, ci->super->drift);
+        else
+          error("Drift task missing !");
 
         for (l = ci->send_rho; l != NULL && l->t->cj->nodeID != cj->nodeID;
              l = l->next)
diff --git a/src/runner.c b/src/runner.c
index 52f91d620a..269ec2229c 100644
--- a/src/runner.c
+++ b/src/runner.c
@@ -1054,7 +1054,8 @@ void *runner_main(void *data) {
 #ifdef SWIFT_DEBUG_CHECKS
 #ifndef WITH_MPI
       if (cj == NULL) { /* self */
-        if (!cell_is_active(ci, e) && t->type != task_type_sort && t->type != task_type_send && t->type != task_type_recv)
+        if (!cell_is_active(ci, e) && t->type != task_type_sort &&
+            t->type != task_type_send && t->type != task_type_recv)
           error(
               "Task (type='%s/%s') should have been skipped ti_current=%d "
               "c->ti_end_min=%d",
@@ -1073,12 +1074,12 @@ void *runner_main(void *data) {
       } else { /* pair */
         if (!cell_is_active(ci, e) && !cell_is_active(cj, e))
 
-	  if(t->type != task_type_send && t->type != task_type_recv)
-          error(
-              "Task (type='%s/%s') should have been skipped ti_current=%d "
-              "ci->ti_end_min=%d cj->ti_end_min=%d",
-              taskID_names[t->type], subtaskID_names[t->subtype], e->ti_current,
-              ci->ti_end_min, cj->ti_end_min);
+          if (t->type != task_type_send && t->type != task_type_recv)
+            error(
+                "Task (type='%s/%s') should have been skipped ti_current=%d "
+                "ci->ti_end_min=%d cj->ti_end_min=%d",
+                taskID_names[t->type], subtaskID_names[t->subtype],
+                e->ti_current, ci->ti_end_min, cj->ti_end_min);
       }
 #endif
 #endif
-- 
GitLab