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 / TThreadDynarray.c
index 73f7543..0691116 100644 (file)
@@ -241,10 +241,8 @@ void ThreadDynarray_clear(ThreadDynarray_t ptr)
 {
   ThreadDynarray_lock(ptr);
 
-  if (ptr->threads) {
-    free(ptr->threads);
-    ptr->threads = NULL;
-  }
+  free(ptr->threads);
+  ptr->threads = NULL;
 
   ptr->count = 0;
   ptr->capacity = 0;