Index: uspace/srv/devman/main.c
===================================================================
--- uspace/srv/devman/main.c	(revision 38b3bafe41afc8f7e1fd5caacbdb63618dcb65e5)
+++ uspace/srv/devman/main.c	(revision 791f58c4248a96e533fe2aa7be934a84a30a46c2)
@@ -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");
 
