Index: kernel/generic/src/synch/mutex.c
===================================================================
--- kernel/generic/src/synch/mutex.c	(revision 4039c77090864ee87e13b9865dbfd0a2bcd56c2f)
+++ kernel/generic/src/synch/mutex.c	(revision 2e4e706a8704952b76f052d1fa9f7a72e9f6d471)
@@ -33,7 +33,7 @@
 /**
  * @file
- * @brief	Mutexes.
+ * @brief Mutexes.
  */
- 
+
 #include <synch/mutex.h>
 #include <synch/semaphore.h>
@@ -44,6 +44,6 @@
 /** Initialize mutex.
  *
- * @param mtx		Mutex.
- * @param type		Type of the mutex.
+ * @param mtx  Mutex.
+ * @param type Type of the mutex.
  */
 void mutex_initialize(mutex_t *mtx, mutex_type_t type)
@@ -57,12 +57,13 @@
  * Timeout mode and non-blocking mode can be requested.
  *
- * @param mtx		Mutex.
- * @param usec		Timeout in microseconds.
- * @param flags		Specify mode of operation.
+ * @param mtx   Mutex.
+ * @param usec  Timeout in microseconds.
+ * @param flags Specify mode of operation.
  *
  * For exact description of possible combinations of
  * usec and flags, see comment for waitq_sleep_timeout().
  *
- * @return		See comment for waitq_sleep_timeout().
+ * @return See comment for waitq_sleep_timeout().
+ *
  */
 int _mutex_lock_timeout(mutex_t *mtx, uint32_t usec, int flags)
@@ -70,10 +71,11 @@
 	int rc;
 
-	if (mtx->type == MUTEX_PASSIVE && THREAD) {
+	if ((mtx->type == MUTEX_PASSIVE) && (THREAD)) {
 		rc = _semaphore_down_timeout(&mtx->sem, usec, flags);
 	} else {
-		ASSERT(mtx->type == MUTEX_ACTIVE || !THREAD);
+		ASSERT((mtx->type == MUTEX_ACTIVE) || (!THREAD));
 		ASSERT(usec == SYNCH_NO_TIMEOUT);
 		ASSERT(!(flags & SYNCH_FLAGS_INTERRUPTIBLE));
+		
 		do {
 			rc = semaphore_trydown(&mtx->sem);
@@ -87,5 +89,5 @@
 /** Release mutex.
  *
- * @param mtx		Mutex.
+ * @param mtx Mutex.
  */
 void mutex_unlock(mutex_t *mtx)
Index: kernel/generic/src/synch/waitq.c
===================================================================
--- kernel/generic/src/synch/waitq.c	(revision 4039c77090864ee87e13b9865dbfd0a2bcd56c2f)
+++ kernel/generic/src/synch/waitq.c	(revision 2e4e706a8704952b76f052d1fa9f7a72e9f6d471)
@@ -261,5 +261,5 @@
 	int rc;
 
-	ASSERT(!PREEMPTION_DISABLED || PARAM_NON_BLOCKING(flags, usec));
+	ASSERT((!PREEMPTION_DISABLED) || (PARAM_NON_BLOCKING(flags, usec)));
 	
 	ipl = waitq_sleep_prepare(wq);
