Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
kill dead code
authorMartin Quinson <martin.quinson@loria.fr>
Sat, 5 Dec 2015 21:32:06 +0000 (22:32 +0100)
committerMartin Quinson <martin.quinson@loria.fr>
Sat, 5 Dec 2015 21:32:06 +0000 (22:32 +0100)
src/xbt/ex.c

index c4438a5..b8a775a 100644 (file)
@@ -405,37 +405,6 @@ static char *mallocex(int size)
 #define SMALLAMOUNT 10
 #define TOOBIG 100000000
 
 #define SMALLAMOUNT 10
 #define TOOBIG 100000000
 
-#if 0                           /* this contains syntax errors, actually */
-static void bad_example(void)
-{
-  struct {
-    char *first;
-  } *globalcontext;
-  ex_t ex;
-
-  /* BAD_EXAMPLE */
-  TRY {
-    char *cp1, *cp2, *cp3;
-
-    cp1 = mallocex(SMALLAMOUNT);
-    globalcontext->first = cp1;
-    cp2 = mallocex(TOOBIG);
-    cp3 = mallocex(SMALLAMOUNT);
-    strcpy(cp1, "foo");
-    strcpy(cp2, "bar");
-  }
-  TRY_CLEANUP {
-    free(cp3);
-    free(cp2);
-    free(cp1);
-  }
-  CATCH_ANONYMOUS {
-    printf("cp3=%s", cp3);
-    RETHROW;
-  }
-  /* end_of_bad_example */
-}
-#endif
 typedef struct {
   char *first;
 } global_context_t;
 typedef struct {
   char *first;
 } global_context_t;