]> AND Public Git Repository - simgrid.git/blobdiff - teshsuite/simdag/platforms/flatifier.cpp
Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
cleanup XML jungle in teshsuite
[simgrid.git] / teshsuite / simdag / platforms / flatifier.cpp
index a3c3cba4201ed08f0fe7259c066f96e17cbd789d..ccda6312b0e69be05026f3318918a38f5aae93eb 100644 (file)
@@ -31,20 +31,18 @@ XBT_LOG_NEW_DEFAULT_CATEGORY(flatifier,
 
 static int name_compare_hosts(const void *n1, const void *n2)
 {
-  char name1[80], name2[80];
-  strcpy(name1, sg_host_get_name(*((sg_host_t *) n1)));
-  strcpy(name2, sg_host_get_name(*((sg_host_t *) n2)));
-
-  return strcmp(name1, name2);
+  return strcmp(
+      sg_host_get_name(*(sg_host_t *) n1),
+      sg_host_get_name(*(sg_host_t *) n2)
+  );
 }
 
 static int name_compare_links(const void *n1, const void *n2)
 {
-  char name1[80], name2[80];
-  strcpy(name1, sg_link_name(*((SD_link_t *) n1)));
-  strcpy(name2, sg_link_name(*((SD_link_t *) n2)));
-
-  return strcmp(name1, name2);
+  return strcmp(
+      sg_link_name(*(SD_link_t *) n1),
+      sg_link_name(*(SD_link_t *) n2)
+  );
 }
 
 static int parse_cmdline(int *timings, int *downgrade, char **platformFile, int argc, char **argv)
@@ -104,13 +102,6 @@ int main(int argc, char **argv)
   const SD_link_t *links;
   xbt_os_timer_t parse_time = xbt_os_timer_new();
 
-#ifdef _XBT_WIN32
-  setbuf(stderr, NULL);
-  setbuf(stdout, NULL);
-#else
-  setvbuf(stdout, NULL, _IOLBF, 0);
-#endif
-
   SD_init(&argc, argv);
 
   if (parse_cmdline(&timings, &downgrade, &platformFile, argc, argv) || !platformFile) {