Index: uspace/srv/devman/main.c
===================================================================
--- uspace/srv/devman/main.c	(revision 58b833c28450decc06c7a346badd4976170e6cda)
+++ uspace/srv/devman/main.c	(revision c6c389ed2708dfad2c6781911b0c9639bedad636)
@@ -66,10 +66,11 @@
 static driver_t *devman_driver_register(void)
 {
+	ipc_call_t icall;
+	ipc_callid_t iid;
+	driver_t *driver = NULL;
+
 	printf(NAME ": devman_driver_register \n");
 	
-	ipc_call_t icall;
-	ipc_callid_t iid = async_get_call(&icall);
-	driver_t *driver = NULL;
-	
+	iid = async_get_call(&icall);
 	if (IPC_GET_METHOD(icall) != DEVMAN_DRIVER_REGISTER) {
 		ipc_answer_0(iid, EREFUSED);
@@ -85,4 +86,5 @@
 		return NULL;
 	}
+
 	printf(NAME ": the %s driver is trying to register by the service.\n",
 	    drv_name);
@@ -91,5 +93,5 @@
 	driver = find_driver(&drivers_list, drv_name);
 	
-	if (NULL == driver) {
+	if (driver == NULL) {
 		printf(NAME ": no driver named %s was found.\n", drv_name);
 		free(drv_name);
@@ -146,5 +148,5 @@
 	}
 	
-	if (NULL == match_id) {
+	if (match_id == NULL) {
 		printf(NAME ": ERROR: devman_receive_match_id - failed to "
 		    "allocate match id.\n");
@@ -160,5 +162,5 @@
 	rc = async_data_write_accept((void **) &match_id_str, true, 0, 0, 0, 0);
 	match_id->id = match_id_str;
-	if (EOK != rc) {
+	if (rc != EOK) {
 		delete_match_id(match_id);
 		printf(NAME ": devman_receive_match_id - failed to receive "
@@ -181,6 +183,6 @@
  * @return		Zero on success, negative error code otherwise.
  */
-static int
-devman_receive_match_ids(ipcarg_t match_count, match_id_list_t *match_ids)
+static int devman_receive_match_ids(ipcarg_t match_count,
+    match_id_list_t *match_ids)
 {
 	int ret = EOK;
@@ -205,15 +207,15 @@
 	
 	fibril_rwlock_write_lock(&tree->rwlock);
-	node_t *parent =  find_dev_node_no_lock(&device_tree, parent_handle);
-	
-	if (NULL == parent) {
+	node_t *parent = find_dev_node_no_lock(&device_tree, parent_handle);
+	
+	if (parent == NULL) {
 		fibril_rwlock_write_unlock(&tree->rwlock);
 		ipc_answer_0(callid, ENOENT);
 		return;
-	}	
+	}
 	
 	char *dev_name = NULL;
 	int rc = async_data_write_accept((void **)&dev_name, true, 0, 0, 0, 0);
-	if (EOK != rc) {
+	if (rc != EOK) {
 		fibril_rwlock_write_unlock(&tree->rwlock);
 		ipc_answer_0(callid, rc);
@@ -227,5 +229,6 @@
 		ipc_answer_0(callid, ENOMEM);
 		return;
-	}	
+	}
+
 	fibril_rwlock_write_unlock(&tree->rwlock);
 	
@@ -245,7 +248,8 @@
 	/* Create devmap path and name for the device. */
 	char *devmap_pathname = NULL;
+
 	asprintf(&devmap_pathname, "%s/%s%c%s", DEVMAP_CLASS_NAMESPACE,
 	    cli->dev_class->name, DEVMAP_SEPARATOR, cli->dev_name);
-	if (NULL == devmap_pathname)
+	if (devmap_pathname == NULL)
 		return;
 	
@@ -279,5 +283,5 @@
 	
 	node_t *dev = find_dev_node(&device_tree, handle);
-	if (NULL == dev) {
+	if (dev == NULL) {
 		ipc_answer_0(callid, ENOENT);
 		return;
@@ -318,5 +322,5 @@
 	
 	driver_t *driver = devman_driver_register();
-	if (NULL == driver)
+	if (driver == NULL)
 		return;
 	
@@ -373,5 +377,5 @@
 	free(pathname);
 
-	if (NULL == dev) {
+	if (dev == NULL) {
 		ipc_answer_0(iid, ENOENT);
 		return;
@@ -404,14 +408,14 @@
 				ipc_answer_0(callid, ENOENT);
 		}
-	}	
-}
-
-static void
-devman_forward(ipc_callid_t iid, ipc_call_t *icall, bool drv_to_parent)
+	}
+}
+
+static void devman_forward(ipc_callid_t iid, ipc_call_t *icall,
+    bool drv_to_parent)
 {
 	device_handle_t handle = IPC_GET_ARG2(*icall);
 	
 	node_t *dev = find_dev_node(&device_tree, handle);
-	if (NULL == dev) {
+	if (dev == NULL) {
 		printf(NAME ": devman_forward error - no device with handle %x "
 		    "was found.\n", handle);
@@ -423,12 +427,12 @@
 	
 	if (drv_to_parent) {
-		if (NULL != dev->parent)
+		if (dev->parent != NULL)
 			driver = dev->parent->drv;
-	} else if (DEVICE_USABLE == dev->state) {
+	} else if (dev->state == DEVICE_USABLE) {
 		driver = dev->drv;
-		assert(NULL != driver);
-	}
-	
-	if (NULL == driver) {
+		assert(driver != NULL);
+	}
+	
+	if (driver == NULL) {
 		printf(NAME ": devman_forward error - the device is not in "
 		    "usable state.\n", handle);
@@ -450,4 +454,5 @@
 		return;
 	}
+
 	printf(NAME ": devman_forward: forward connection to device %s to "
 	    "driver %s.\n", dev->pathname, driver->name);
@@ -460,15 +465,16 @@
 {
 	dev_handle_t devmap_handle = IPC_GET_METHOD(*icall);
-	
-	node_t *dev = find_devmap_tree_device(&device_tree, devmap_handle);
-	if (NULL == dev)
+	node_t *dev;
+
+	dev = find_devmap_tree_device(&device_tree, devmap_handle);
+	if (dev == NULL)
 		dev = find_devmap_class_device(&class_list, devmap_handle);
 	
-	if (NULL == dev || NULL == dev->drv) {
+	if (dev == NULL || dev->drv == NULL) {
 		ipc_answer_0(iid, ENOENT);
 		return;
 	}
 	
-	if (DEVICE_USABLE != dev->state || dev->drv->phone <= 0) {
+	if (dev->state != DEVICE_USABLE || dev->drv->phone <= 0) {
 		ipc_answer_0(iid, EINVAL);
 		return;
@@ -493,5 +499,5 @@
 	 * passes device handle to the driver as an ipc method.)
 	 */
-	if (IPC_M_CONNECT_ME_TO != IPC_GET_METHOD(*icall))
+	if (IPC_GET_METHOD(*icall) != IPC_M_CONNECT_ME_TO)
 		devman_connection_devmapper(iid, icall);
 
@@ -531,9 +537,10 @@
 	/* Initialize list of available drivers. */
 	init_driver_list(&drivers_list);
-	if (0 == lookup_available_drivers(&drivers_list,
-	    DRIVER_DEFAULT_STORE)) {
+	if (lookup_available_drivers(&drivers_list,
+	    DRIVER_DEFAULT_STORE) == 0) {
 		printf(NAME " no drivers found.");
 		return false;
 	}
+
 	printf(NAME ": devman_init  - list of drivers has been initialized.\n");
 
Index: uspace/srv/devman/match.c
===================================================================
--- uspace/srv/devman/match.c	(revision 58b833c28450decc06c7a346badd4976170e6cda)
+++ uspace/srv/devman/match.c	(revision c6c389ed2708dfad2c6781911b0c9639bedad636)
@@ -55,5 +55,5 @@
 		match_id_t *tmp_ma_id;
 	
-		if (0 == str_cmp(drv_id->id, dev_id->id)) {
+		if (str_cmp(drv_id->id, dev_id->id) == 0) {
 		 	/*
 		 	 * We found a match.
@@ -67,5 +67,5 @@
 		 * list of match ids.
 		 */
-		if (drv_head != drv_link->next) {
+		if (drv_link->next != drv_head) {
 			tmp_ma_id = list_get_instance(drv_link->next,
 			    match_id_t, link);
@@ -79,5 +79,5 @@
 		 * list of match ids.
 		 */
-		if (dev_head != dev_link->next) {
+		if (dev_link->next != dev_head) {
 			tmp_ma_id = list_get_instance(dev_link->next,
 			    match_id_t, link);
@@ -99,5 +99,5 @@
 		}
 		
-	} while (drv_head != drv_link->next && dev_head != dev_link->next);
+	} while (drv_link->next != drv_head && dev_link->next != dev_head);
 	
 	return 0;
Index: uspace/srv/devman/util.c
===================================================================
--- uspace/srv/devman/util.c	(revision 58b833c28450decc06c7a346badd4976170e6cda)
+++ uspace/srv/devman/util.c	(revision c6c389ed2708dfad2c6781911b0c9639bedad636)
@@ -61,5 +61,5 @@
 char *get_path_elem_end(char *path)
 {
-	while (0 != *path && '/' != *path)
+	while (*path != '\0' && *path != '/')
 		path++;
 	return path;
Index: uspace/srv/devman/util.h
===================================================================
--- uspace/srv/devman/util.h	(revision 58b833c28450decc06c7a346badd4976170e6cda)
+++ uspace/srv/devman/util.h	(revision c6c389ed2708dfad2c6781911b0c9639bedad636)
@@ -52,8 +52,9 @@
 	size_t len = 0;
 	
-	while(*str != 0 && !isspace(*str)) {
+	while(*str != '\0' && !isspace(*str)) {
 		len++;
 		str++;
 	}
+
 	return len;
 }
@@ -61,5 +62,5 @@
 static inline void free_not_null(const void *ptr)
 {
-	if (NULL != ptr)
+	if (ptr != NULL)
 		free(ptr);
 }
@@ -71,5 +72,5 @@
 	
 	str = (char *) malloc(size);
-	if (NULL != str)
+	if (str != NULL)
 		str_cpy(str, size, s);
 	return str;
@@ -79,5 +80,5 @@
 {
 	while (*str) {
-		if (orig == *str)
+		if (*str == orig)
 			*str = repl;
 		str++;
