Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Kill "if" before free, and useless cast of free argument.
[simgrid.git] / win32_test_app / src / TStream.c
index d2517ff..da18135 100644 (file)
@@ -209,8 +209,7 @@ void Stream_free(Stream_t ptr)
   if ((NULL != ptr->file) && (stdin != ptr->file))
     fclose(ptr->file);
 
-  if (NULL != ptr->line)
-    free(ptr->line);
+  free(ptr->line);
 
   DeleteCriticalSection(&cs);
 
@@ -483,8 +482,7 @@ void Stream_printLine(Stream_t stream, line_type_t line_type)
      */
   }
 
-  if (__date)
-    free(__date);
+  free(__date);
 
   Stream_unlock(stream);
 }