xbt_mutex_destroy((*queue)->mutex);
xbt_cond_destroy((*queue)->not_full);
xbt_cond_destroy((*queue)->not_empty);
- free((*queue));
+ free(*queue);
*queue = NULL;
}
} s_Buffer_t, *Buffer_t;
/* Asserts that a s_Buffer is valid. */
-#define ASSERT_VALID_Buffer(p) ( ASSERT_NOT_NULL((p)) /*&& ASSERT_NOT_NULL((p)->data)*/ )
+#define ASSERT_VALID_Buffer(p) ( ASSERT_NOT_NULL(p) /*&& ASSERT_NOT_NULL((p)->data)*/ )
/* The default buffer capacity (512 bytes). */
#define DEFAULT_Buffer_CAPACITY ((size_t)512)
/* Asserts that a condition is true.*/
#define ASSERT(c) assert(c)
/* Asserts that a pointer is not NULL.*/
-#define ASSERT_NOT_NULL(p) assert(NULL != p)
+#define ASSERT_NOT_NULL(p) assert(NULL != (p))
/* Error number type (int) */
#ifndef __ERRNO_TYPE_DEFINED
/* Close inheritable copies of the handles you do not want to be inherited. */
- if (!CloseHandle((context->hChildStdoutReadTmp))) {
+ if (!CloseHandle(context->hChildStdoutReadTmp)) {
setErrno(E_CANNOT_CLOSE_CHILD_STDIN_TEMPORY_HANDLE);
return getErrno();
}
context->hChildStdoutReadTmp = NULL;
- if (!CloseHandle((context->hChildStdinWriteTmp))) {
+ if (!CloseHandle(context->hChildStdinWriteTmp)) {
setErrno(E_CANNOT_CLOSE_CHILD_STDOUT_TEMPORY_HANDLE);
return getErrno();
}