Index: uspace/srv/vfs/vfs_lookup.c
===================================================================
--- uspace/srv/vfs/vfs_lookup.c	(revision f6b6b4082d1cfd61c1bca4d6ce9cd55a0efc3faf)
+++ uspace/srv/vfs/vfs_lookup.c	(revision 61600e74e6f0099b975c6be90e44560123057dc5)
@@ -49,13 +49,10 @@
 #include <assert.h>
 
-#define DPRINTF(...)
-
-#define min(a, b)  ((a) < (b) ? (a) : (b))
-
 FIBRIL_MUTEX_INITIALIZE(plb_mutex);
 LIST_INITIALIZE(plb_entries);	/**< PLB entry ring buffer. */
 uint8_t *plb = NULL;
 
-static int plb_insert_entry(plb_entry_t *entry, char *path, size_t *start, size_t len)
+static int plb_insert_entry(plb_entry_t *entry, char *path, size_t *start,
+    size_t len)
 {
 	fibril_mutex_lock(&plb_mutex);
@@ -174,7 +171,6 @@
 		
 		rc = vfs_lookup_internal(base, path, L_DIRECTORY, &res);
-		if (rc != EOK) {
+		if (rc != EOK)
 			goto out;
-		}
 		triplet = &res.triplet;
 		
@@ -190,5 +186,6 @@
 	}
 	
-	if (triplet->fs_handle != child->fs_handle || triplet->service_id != child->service_id) {
+	if (triplet->fs_handle != child->fs_handle ||
+	    triplet->service_id != child->service_id) {
 		rc = EXDEV;
 		goto out;
@@ -196,5 +193,6 @@
 	
 	async_exch_t *exch = vfs_exchange_grab(triplet->fs_handle);
-	aid_t req = async_send_3(exch, VFS_OUT_LINK, triplet->service_id, triplet->index, child->index, NULL);
+	aid_t req = async_send_3(exch, VFS_OUT_LINK, triplet->service_id,
+	    triplet->index, child->index, NULL);
 	
 	rc = async_data_write_start(exch, component, str_size(component) + 1);
@@ -202,15 +200,13 @@
 	async_wait_for(req, &orig_rc);
 	vfs_exchange_release(exch);
-	if (orig_rc != EOK) {
+	if (orig_rc != EOK)
 		rc = orig_rc;
-	}
 	
 out:
-	DPRINTF("vfs_link_internal() with path '%s' returns %d\n", path, rc);
 	return rc;
 }
 
 static int out_lookup(vfs_triplet_t *base, size_t *pfirst, size_t *plen,
-	int lflag, vfs_lookup_res_t *result)
+    int lflag, vfs_lookup_res_t *result)
 {
 	assert(base);
@@ -220,12 +216,12 @@
 	ipc_call_t answer;
 	async_exch_t *exch = vfs_exchange_grab(base->fs_handle);
-	aid_t req = async_send_5(exch, VFS_OUT_LOOKUP, (sysarg_t) *pfirst, (sysarg_t) *plen,
-	    (sysarg_t) base->service_id, (sysarg_t) base->index, (sysarg_t) lflag, &answer);
+	aid_t req = async_send_5(exch, VFS_OUT_LOOKUP, (sysarg_t) *pfirst,
+	    (sysarg_t) *plen, (sysarg_t) base->service_id,
+	    (sysarg_t) base->index, (sysarg_t) lflag, &answer);
 	async_wait_for(req, &rc);
 	vfs_exchange_release(exch);
 	
-	if ((int) rc < 0) {
+	if ((int) rc < 0)
 		return (int) rc;
-	}
 	
 	unsigned last = *pfirst + *plen;
@@ -237,5 +233,6 @@
 	result->triplet.index = (fs_index_t) IPC_GET_ARG2(answer);
 	result->size = (int64_t)(int32_t) IPC_GET_ARG4(answer);
-	result->type = IPC_GET_ARG5(answer) ? VFS_NODE_DIRECTORY : VFS_NODE_FILE;
+	result->type = IPC_GET_ARG5(answer) ?
+	    VFS_NODE_DIRECTORY : VFS_NODE_FILE;
 	return EOK;
 }
@@ -253,5 +250,6 @@
  *
  */
-int vfs_lookup_internal(vfs_node_t *base, char *path, int lflag, vfs_lookup_res_t *result)
+int vfs_lookup_internal(vfs_node_t *base, char *path, int lflag,
+    vfs_lookup_res_t *result)
 {
 	assert(base != NULL);
@@ -262,5 +260,4 @@
 	char *npath = canonify(path, &len);
 	if (!npath) {
-		DPRINTF("vfs_lookup_internal() can't canonify path: %s\n", path);
 		rc = EINVAL;
 		return rc;
@@ -274,8 +271,6 @@
 	plb_entry_t entry;
 	rc = plb_insert_entry(&entry, path, &first, len);
-	if (rc != EOK) {
-		DPRINTF("vfs_lookup_internal() can't insert entry into PLB: %d\n", rc);
+	if (rc != EOK)
 		return rc;
-	}
 	
 	size_t next = first;
@@ -286,5 +281,5 @@
 	/* Resolve path as long as there are mount points to cross. */
 	while (nlen > 0) {
-		while (base->mount != NULL) {
+		while (base->mount) {
 			if (lflag & L_DISABLE_MOUNTS) {
 				rc = EXDEV;
@@ -295,8 +290,8 @@
 		}
 		
-		rc = out_lookup((vfs_triplet_t *) base, &next, &nlen, lflag, &res);
-		if (rc != EOK) {
+		rc = out_lookup((vfs_triplet_t *) base, &next, &nlen, lflag,
+		    &res);
+		if (rc != EOK)
 			goto out;
-		}
 		
 		if (nlen > 0) {
@@ -349,5 +344,4 @@
 out:
 	plb_clear_entry(&entry, first, len);
-	DPRINTF("vfs_lookup_internal() with path '%s' returns %d\n", path, rc);
 	return rc;
 }
