Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Reindent TRY/TRY_CLEANUP/CATCH constructs.
[simgrid.git] / src / xbt / ex.c
index 3212457..b2052e1 100644 (file)
@@ -315,7 +315,8 @@ XBT_TEST_UNIT("variables", test_variables, "variable value preservation")
     r2 = 5678;
     v2 = 5678;
     THROWF(unknown_error, 0, "toto");
-  } CATCH(ex) {
+  }
+  CATCH(ex) {
     xbt_test_add("variable preservation");
     if (r1 != 1234)
       xbt_test_fail("r1=%d (!= 1234)", r1);
@@ -341,7 +342,8 @@ XBT_TEST_UNIT("cleanup", test_cleanup, "cleanup handling")
   TRY {
     v1 = 5678;
     THROWF(1, 2, "blah");
-  } TRY_CLEANUP {
+  }
+  TRY_CLEANUP {
     if (v1 != 5678)
       xbt_test_fail("v1 = %d (!= 5678)", v1);
     c = 1;
@@ -389,7 +391,8 @@ static void bad_example(void)
     cp3 = mallocex(SMALLAMOUNT);
     strcpy(cp1, "foo");
     strcpy(cp2, "bar");
-  } TRY_CLEANUP {
+  }
+  TRY_CLEANUP {
     if (cp3 != NULL)
       free(cp3);
     if (cp2 != NULL)
@@ -425,7 +428,8 @@ static void good_example(void)
       cp3 = mallocex(SMALLAMOUNT);
       strcpy(cp1, "foo");
       strcpy(cp2, "bar");
-    } TRY_CLEANUP {             /*04 */
+    }
+    TRY_CLEANUP {               /*04 */
       printf("cp3=%s", cp3 == NULL /*02 */ ? "" : cp3);
       if (cp3 != NULL)
         free(cp3);