Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Value stored to 'linelen' here is never read.
[simgrid.git] / tools / tesh / tesh.c
index ae83f64..7f75229 100644 (file)
@@ -1,6 +1,6 @@
 /* TESH (Test Shell) -- mini shell specialized in running test units        */
 
-/* Copyright (c) 2007, 2008, 2009, 2010. The SimGrid Team.
+/* Copyright (c) 2007-2013. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -11,8 +11,6 @@
 #pragma hdrstop
 #endif
 
-#include "simgrid_config.h" //For getline, keep that include first
-
 #include "tesh.h"
 #include "xbt.h"
 
@@ -106,7 +104,7 @@ static void handle_suite(const char *filename, FILE * IN)
   buff = xbt_strbuff_new();
   rctx = rctx_new();
 
-  while (getline(&line, &len, IN) != -1) {
+  while (xbt_getline(&line, &len, IN) != -1) {
     line_num++;
 
     /* Count the line length while checking wheather it's blank */
@@ -143,7 +141,6 @@ static void handle_suite(const char *filename, FILE * IN)
       } else {
         to_be_continued = 1;
         line[linelen - 2] = '\0';
-        linelen -= 2;
         if (!buff->used)
           buffbegin = line_num;
       }