Index: uspace/app/bdsh/cmds/builtin_cmds.c
===================================================================
--- uspace/app/bdsh/cmds/builtin_cmds.c	(revision eb748a07badfc0c0a45c245ac989bd41eb3ca16a)
+++ uspace/app/bdsh/cmds/builtin_cmds.c	(revision 2c4e1cc2aa4f1a4b249af5c661e93ac170ba5158)
@@ -64,5 +64,5 @@
 		return -1;
 
-	for(i=0; builtin_aliases[i] != NULL; i+=2) {
+	for (i = 0; builtin_aliases[i] != NULL; i += 2) {
 		if (!str_cmp(builtin_aliases[i], command))
 			return 1;
@@ -79,7 +79,7 @@
 		return (char *)NULL;
 
-	for(i=0; builtin_aliases[i] != NULL; i+=2) {
+	for (i = 0; builtin_aliases[i] != NULL; i += 2) {
 		if (!str_cmp(builtin_aliases[i], command))
-			return (char *)builtin_aliases[i+1];
+			return (char *)builtin_aliases[i + 1];
 	}
 
Index: uspace/app/bdsh/cmds/builtins/batch/batch.c
===================================================================
--- uspace/app/bdsh/cmds/builtins/batch/batch.c	(revision eb748a07badfc0c0a45c245ac989bd41eb3ca16a)
+++ uspace/app/bdsh/cmds/builtins/batch/batch.c	(revision 2c4e1cc2aa4f1a4b249af5c661e93ac170ba5158)
@@ -48,17 +48,17 @@
 	if (level == HELP_SHORT) {
 		printf(
-		"\n  batch [filename] [-c]\n"
-		"  Issues commands stored in the file.\n"
-		"  Each command must correspond to the single line in the file.\n\n");
+		    "\n  batch [filename] [-c]\n"
+		    "  Issues commands stored in the file.\n"
+		    "  Each command must correspond to the single line in the file.\n\n");
 	} else {
 		printf(
-		"\n  `batch' - issues a batch of commands\n"
-		"  Issues commands stored in the file. Each command must correspond\n"
-		"  to the single line in the file. Empty lines can be used to visually\n"
-		"  separate groups of commands. There is no support for comments,\n"
-		"  variables, recursion or other programming constructs - the `batch'\n"
-		"  command is indeed very trivial.\n"
-		"  If the filename is followed by -c, execution continues even if some\n"
-		"  of the commands failed.\n\n");
+		    "\n  `batch' - issues a batch of commands\n"
+		    "  Issues commands stored in the file. Each command must correspond\n"
+		    "  to the single line in the file. Empty lines can be used to visually\n"
+		    "  separate groups of commands. There is no support for comments,\n"
+		    "  variables, recursion or other programming constructs - the `batch'\n"
+		    "  command is indeed very trivial.\n"
+		    "  If the filename is followed by -c, execution continues even if some\n"
+		    "  of the commands failed.\n\n");
 	}
 
Index: uspace/app/bdsh/cmds/builtins/builtins.h
===================================================================
--- uspace/app/bdsh/cmds/builtins/builtins.h	(revision eb748a07badfc0c0a45c245ac989bd41eb3ca16a)
+++ uspace/app/bdsh/cmds/builtins/builtins.h	(revision 2c4e1cc2aa4f1a4b249af5c661e93ac170ba5158)
@@ -12,5 +12,5 @@
 #include "cd/cd_def.inc"
 #include "exit/exit_def.inc"
-	{NULL, NULL, NULL, NULL, 0}
+	{ NULL, NULL, NULL, NULL, 0 }
 };
 
Index: uspace/app/bdsh/cmds/builtins/cd/cd.c
===================================================================
--- uspace/app/bdsh/cmds/builtins/cd/cd.c	(revision eb748a07badfc0c0a45c245ac989bd41eb3ca16a)
+++ uspace/app/bdsh/cmds/builtins/cd/cd.c	(revision 2c4e1cc2aa4f1a4b249af5c661e93ac170ba5158)
@@ -72,7 +72,7 @@
 	} else {
 		printf(
-		"  %s <directory>\n"
-		"  Change directory to <directory>, e.g `%s /sbin'\n",
-			cmdname, cmdname);
+		    "  %s <directory>\n"
+		    "  Change directory to <directory>, e.g `%s /sbin'\n",
+		    cmdname, cmdname);
 	}
 
@@ -113,5 +113,5 @@
 	if (argc < 2) {
 		printf("%s - no directory specified. Try `help %s extended'\n",
-			cmdname, cmdname);
+		    cmdname, cmdname);
 		return CMD_FAILURE;
 	}
Index: uspace/app/bdsh/cmds/cmds.h
===================================================================
--- uspace/app/bdsh/cmds/cmds.h	(revision eb748a07badfc0c0a45c245ac989bd41eb3ca16a)
+++ uspace/app/bdsh/cmds/cmds.h	(revision 2c4e1cc2aa4f1a4b249af5c661e93ac170ba5158)
@@ -52,10 +52,10 @@
 
 /* Types for module command entry and help */
-typedef int (* mod_entry_t)(char **);
-typedef void (* mod_help_t)(unsigned int);
+typedef int (*mod_entry_t)(char **);
+typedef void (*mod_help_t)(unsigned int);
 
 /* Built-in commands need to be able to modify cliuser_t */
-typedef int (* builtin_entry_t)(char **, cliuser_t *);
-typedef void (* builtin_help_t)(unsigned int);
+typedef int (*builtin_entry_t)(char **, cliuser_t *);
+typedef void (*builtin_help_t)(unsigned int);
 
 /* Module structure */
Index: uspace/app/bdsh/cmds/mod_cmds.c
===================================================================
--- uspace/app/bdsh/cmds/mod_cmds.c	(revision eb748a07badfc0c0a45c245ac989bd41eb3ca16a)
+++ uspace/app/bdsh/cmds/mod_cmds.c	(revision 2c4e1cc2aa4f1a4b249af5c661e93ac170ba5158)
@@ -80,5 +80,5 @@
 		return -1;
 
-	for(i=0; mod_aliases[i] != NULL; i+=2) {
+	for (i = 0; mod_aliases[i] != NULL; i += 2) {
 		if (!str_cmp(mod_aliases[i], command))
 			return 1;
@@ -96,7 +96,7 @@
 		return (char *)NULL;
 
-	for(i=0; mod_aliases[i] != NULL; i+=2) {
+	for (i = 0; mod_aliases[i] != NULL; i += 2) {
 		if (!str_cmp(mod_aliases[i], command))
-			return (char *)mod_aliases[i+1];
+			return (char *)mod_aliases[i + 1];
 	}
 
Index: uspace/app/bdsh/cmds/modules/cat/cat.c
===================================================================
--- uspace/app/bdsh/cmds/modules/cat/cat.c	(revision eb748a07badfc0c0a45c245ac989bd41eb3ca16a)
+++ uspace/app/bdsh/cmds/modules/cat/cat.c	(revision 2c4e1cc2aa4f1a4b249af5c661e93ac170ba5158)
@@ -88,17 +88,17 @@
 		help_cmd_cat(HELP_SHORT);
 		printf(
-		"Usage:  %s [options] <file1> [file2] [...]\n"
-		"Options:\n"
-		"  -h, --help       A short option summary\n"
-		"  -v, --version    Print version information and exit\n"
-		"  -H, --head ##    Print only the first ## bytes\n"
-		"  -t, --tail ##    Print only the last ## bytes\n"
-		"  -b, --buffer ##  Set the read buffer size to ##\n"
-		"  -m, --more       Pause after each screen full\n"
-		"  -x, --hex        Print bytes as hex values\n"
-		"  -s, --stdin      Treat `-' in file list as standard input\n"
-		"  -n, --number     Number all output lines\n"
-		"Currently, %s is under development, some options don't work.\n",
-		cmdname, cmdname);
+		    "Usage:  %s [options] <file1> [file2] [...]\n"
+		    "Options:\n"
+		    "  -h, --help       A short option summary\n"
+		    "  -v, --version    Print version information and exit\n"
+		    "  -H, --head ##    Print only the first ## bytes\n"
+		    "  -t, --tail ##    Print only the last ## bytes\n"
+		    "  -b, --buffer ##  Set the read buffer size to ##\n"
+		    "  -m, --more       Pause after each screen full\n"
+		    "  -x, --hex        Print bytes as hex values\n"
+		    "  -s, --stdin      Treat `-' in file list as standard input\n"
+		    "  -n, --number     Number all output lines\n"
+		    "Currently, %s is under development, some options don't work.\n",
+		    cmdname, cmdname);
 	}
 
@@ -108,9 +108,9 @@
 static void waitprompt(void)
 {
-	console_set_pos(console, 0, console_rows-1);
+	console_set_pos(console, 0, console_rows - 1);
 	console_set_color(console, COLOR_WHITE, COLOR_BLUE, 0);
 
 	printf("ENTER/SPACE/PAGE DOWN - next page, "
-	       "ESC/Q - quit, C - continue unpaged");
+	    "ESC/Q - quit, C - continue unpaged");
 	fflush(stdout);
 
@@ -265,9 +265,8 @@
 			for (i = 0; i < bytes && !should_quit; i++) {
 				if (hex) {
-					paged_char(hexchars[((uint8_t)buff[i])/16]);
-					paged_char(hexchars[((uint8_t)buff[i])%16]);
-					paged_char(((count+i+1) & 0xf) == 0 ? '\n' : ' ');
-				}
-				else {
+					paged_char(hexchars[((uint8_t)buff[i]) / 16]);
+					paged_char(hexchars[((uint8_t)buff[i]) % 16]);
+					paged_char(((count + i + 1) & 0xf) == 0 ? '\n' : ' ');
+				} else {
 					wchar_t c = str_decode(buff, &offset, bytes);
 					if (c == 0) {
@@ -353,5 +352,5 @@
 			return CMD_SUCCESS;
 		case 'H':
-			if (!optarg || str_uint64_t(optarg, NULL, 10, false, &head) != EOK ) {
+			if (!optarg || str_uint64_t(optarg, NULL, 10, false, &head) != EOK) {
 				puts("Invalid head size\n");
 				return CMD_FAILURE;
@@ -359,5 +358,5 @@
 			break;
 		case 't':
-			if (!optarg || str_uint64_t(optarg, NULL, 10, false, &tail) != EOK ) {
+			if (!optarg || str_uint64_t(optarg, NULL, 10, false, &tail) != EOK) {
 				puts("Invalid tail size\n");
 				return CMD_FAILURE;
@@ -367,5 +366,5 @@
 			break;
 		case 'b':
-			if (!optarg || str_size_t(optarg, NULL, 10, false, &buffer) != EOK ) {
+			if (!optarg || str_size_t(optarg, NULL, 10, false, &buffer) != EOK) {
 				puts("Invalid buffer size\n");
 				return CMD_FAILURE;
@@ -391,5 +390,5 @@
 	if (argc < 1) {
 		printf("%s - incorrect number of arguments. Try `%s --help'\n",
-			cmdname, cmdname);
+		    cmdname, cmdname);
 		return CMD_FAILURE;
 	}
Index: uspace/app/bdsh/cmds/modules/cp/cp.c
===================================================================
--- uspace/app/bdsh/cmds/modules/cp/cp.c	(revision eb748a07badfc0c0a45c245ac989bd41eb3ca16a)
+++ uspace/app/bdsh/cmds/modules/cp/cp.c	(revision 2c4e1cc2aa4f1a4b249af5c661e93ac170ba5158)
@@ -53,5 +53,5 @@
 	{ "buffer", required_argument, 0, 'b' },
 	{ "force", no_argument, 0, 'f' },
-	{ "interactive", no_argument, 0, 'i'},
+	{ "interactive", no_argument, 0, 'i' },
 	{ "recursive", no_argument, 0, 'r' },
 	{ "help", no_argument, 0, 'h' },
@@ -160,5 +160,5 @@
 		}
 
-		switch(ev.ev.key.key) {
+		switch (ev.ev.key.key) {
 		case KC_Y:
 			printf("y\n");
@@ -384,5 +384,5 @@
 
 static int copy_file(const char *src, const char *dest,
-	size_t blen, int vb)
+    size_t blen, int vb)
 {
 	int fd1, fd2;
Index: uspace/app/bdsh/cmds/modules/echo/echo.c
===================================================================
--- uspace/app/bdsh/cmds/modules/echo/echo.c	(revision eb748a07badfc0c0a45c245ac989bd41eb3ca16a)
+++ uspace/app/bdsh/cmds/modules/echo/echo.c	(revision 2c4e1cc2aa4f1a4b249af5c661e93ac170ba5158)
@@ -57,5 +57,5 @@
 	unsigned int argc;
 
-	for (argc = 1; argv[argc] != NULL; argc ++) {
+	for (argc = 1; argv[argc] != NULL; argc++) {
 		printf("%s ", argv[argc]);
 	}
Index: uspace/app/bdsh/cmds/modules/help/help.c
===================================================================
--- uspace/app/bdsh/cmds/modules/help/help.c	(revision eb748a07badfc0c0a45c245ac989bd41eb3ca16a)
+++ uspace/app/bdsh/cmds/modules/help/help.c	(revision 2c4e1cc2aa4f1a4b249af5c661e93ac170ba5158)
@@ -79,15 +79,15 @@
 	if (level == HELP_SHORT) {
 		printf(
-		"\n  %s [command] <extended>\n"
-		"  Use help [command] extended for detailed help on [command] "
-		", even `help'\n\n", cmdname);
+		    "\n  %s [command] <extended>\n"
+		    "  Use help [command] extended for detailed help on [command] "
+		    ", even `help'\n\n", cmdname);
 	} else {
 		printf(
-		"\n  `%s' - shows help for commands\n"
-		"  Examples:\n"
-		"   %s [command]           Show help for [command]\n"
-		"   %s [command] extended  Show extended help for [command]\n"
-		"\n  If no argument is given to %s, a list of commands are shown\n\n",
-		cmdname, cmdname, cmdname, cmdname);
+		    "\n  `%s' - shows help for commands\n"
+		    "  Examples:\n"
+		    "   %s [command]           Show help for [command]\n"
+		    "   %s [command] extended  Show extended help for [command]\n"
+		    "\n  If no argument is given to %s, a list of commands are shown\n\n",
+		    cmdname, cmdname, cmdname, cmdname);
 	}
 
@@ -105,22 +105,22 @@
 	/* First, show a list of built in commands that are available in this mode */
 	for (cmd = builtins; cmd->name != NULL; cmd++) {
-			if (is_builtin_alias(cmd->name))
-				printf("   %-16s\tAlias for `%s'\n", cmd->name,
-					alias_for_builtin(cmd->name));
-			else
-				printf("   %-16s\t%s\n", cmd->name, cmd->desc);
+		if (is_builtin_alias(cmd->name))
+			printf("   %-16s\tAlias for `%s'\n", cmd->name,
+			    alias_for_builtin(cmd->name));
+		else
+			printf("   %-16s\t%s\n", cmd->name, cmd->desc);
 	}
 
 	/* Now, show a list of module commands that are available in this mode */
 	for (mod = modules; mod->name != NULL; mod++) {
-			if (is_module_alias(mod->name))
-				printf("   %-16s\tAlias for `%s'\n", mod->name,
-					alias_for_module(mod->name));
-			else
-				printf("   %-16s\t%s\n", mod->name, mod->desc);
+		if (is_module_alias(mod->name))
+			printf("   %-16s\tAlias for `%s'\n", mod->name,
+			    alias_for_module(mod->name));
+		else
+			printf("   %-16s\t%s\n", mod->name, mod->desc);
 	}
 
 	printf("\n  Try %s %s for more information on how `%s' works.\n\n",
-		cmdname, cmdname, cmdname);
+	    cmdname, cmdname, cmdname);
 }
 
Index: uspace/app/bdsh/cmds/modules/ls/ls.c
===================================================================
--- uspace/app/bdsh/cmds/modules/ls/ls.c	(revision eb748a07badfc0c0a45c245ac989bd41eb3ca16a)
+++ uspace/app/bdsh/cmds/modules/ls/ls.c	(revision 2c4e1cc2aa4f1a4b249af5c661e93ac170ba5158)
@@ -216,5 +216,5 @@
 
 out:
-	for(i = 0; i < nbdirs; i++)
+	for (i = 0; i < nbdirs; i++)
 		free(tosort[i].name);
 	free(tosort);
@@ -240,5 +240,5 @@
 	struct dir_elem_t *dir_list;
 
-	const char * const trailing_slash = "/";
+	const char *const trailing_slash = "/";
 
 	nbdirs = 0;
@@ -264,5 +264,5 @@
 		if (str_size(subdir_path) + str_size(path) + 1 <= PATH_MAX)
 			str_append(subdir_path, PATH_MAX, path);
-		if (path[str_size(path)-1] != '/' &&
+		if (path[str_size(path) - 1] != '/' &&
 		    str_size(subdir_path) + str_size(trailing_slash) + 1 <= PATH_MAX)
 			str_append(subdir_path, PATH_MAX, trailing_slash);
@@ -328,11 +328,11 @@
 		help_cmd_ls(HELP_SHORT);
 		printf(
-		"Usage:  %s [options] [path]\n"
-		"If not path is given, the current working directory is used.\n"
-		"Options:\n"
-		"  -h, --help       A short option summary\n"
-		"  -u, --unsort     Do not sort directory entries\n"
-		"  -r, --recursive  List subdirectories recursively\n",
-		cmdname);
+		    "Usage:  %s [options] [path]\n"
+		    "If not path is given, the current working directory is used.\n"
+		    "Options:\n"
+		    "  -h, --help       A short option summary\n"
+		    "  -u, --unsort     Do not sort directory entries\n"
+		    "  -r, --recursive  List subdirectories recursively\n",
+		    cmdname);
 	}
 
Index: uspace/app/bdsh/cmds/modules/mkfile/mkfile.c
===================================================================
--- uspace/app/bdsh/cmds/modules/mkfile/mkfile.c	(revision eb748a07badfc0c0a45c245ac989bd41eb3ca16a)
+++ uspace/app/bdsh/cmds/modules/mkfile/mkfile.c	(revision 2c4e1cc2aa4f1a4b249af5c661e93ac170ba5158)
@@ -53,8 +53,8 @@
 
 static struct option const long_options[] = {
-	{"size", required_argument, 0, 's'},
-	{"sparse", no_argument, 0, 'p'},
-	{"help", no_argument, 0, 'h'},
-	{0, 0, 0, 0}
+	{ "size", required_argument, 0, 's' },
+	{ "sparse", no_argument, 0, 'p' },
+	{ "help", no_argument, 0, 'h' },
+	{ 0, 0, 0, 0 }
 };
 
@@ -66,13 +66,13 @@
 		help_cmd_mkfile(HELP_SHORT);
 		printf(
-		"Usage:  %s [options] <path>\n"
-		"Options:\n"
-		"  -h, --help       A short option summary\n"
-		"  -s, --size sz    Size of the file\n"
-		"  -p, --sparse     Create a sparse file\n"
-		"\n"
-		"Size is a number followed by 'k', 'm' or 'g' for kB, MB, GB.\n"
-		"E.g. 100k, 2m, 1g.\n",
-		cmdname);
+		    "Usage:  %s [options] <path>\n"
+		    "Options:\n"
+		    "  -h, --help       A short option summary\n"
+		    "  -s, --size sz    Size of the file\n"
+		    "  -p, --sparse     Create a sparse file\n"
+		    "\n"
+		    "Size is a number followed by 'k', 'm' or 'g' for kB, MB, GB.\n"
+		    "E.g. 100k, 2m, 1g.\n",
+		    cmdname);
 	}
 
@@ -101,11 +101,18 @@
 
 	if (ep[1] != '\0')
-		    return EINVAL;
+		return EINVAL;
 
 	switch (tolower(ep[0])) {
-	case 'k': unit = 1024; break;
-	case 'm': unit = 1024*1024; break;
-	case 'g': unit = 1024*1024*1024; break;
-	default: return EINVAL;
+	case 'k':
+		unit = 1024;
+		break;
+	case 'm':
+		unit = 1024 * 1024;
+		break;
+	case 'g':
+		unit = 1024 * 1024 * 1024;
+		break;
+	default:
+		return EINVAL;
 	}
 
@@ -162,5 +169,5 @@
 	if (argc != 1) {
 		printf("%s: incorrect number of arguments. Try `%s --help'\n",
-			cmdname, cmdname);
+		    cmdname, cmdname);
 		return CMD_FAILURE;
 	}
Index: uspace/app/bdsh/cmds/modules/modules.h
===================================================================
--- uspace/app/bdsh/cmds/modules/modules.h	(revision eb748a07badfc0c0a45c245ac989bd41eb3ca16a)
+++ uspace/app/bdsh/cmds/modules/modules.h	(revision 2c4e1cc2aa4f1a4b249af5c661e93ac170ba5158)
@@ -87,5 +87,5 @@
 #include "cmp/cmp_def.inc"
 
-	{NULL, NULL, NULL, NULL}
+	{ NULL, NULL, NULL, NULL }
 };
 
Index: uspace/app/bdsh/cmds/modules/printf/printf.c
===================================================================
--- uspace/app/bdsh/cmds/modules/printf/printf.c	(revision eb748a07badfc0c0a45c245ac989bd41eb3ca16a)
+++ uspace/app/bdsh/cmds/modules/printf/printf.c	(revision 2c4e1cc2aa4f1a4b249af5c661e93ac170ba5158)
@@ -69,7 +69,7 @@
  * @param arg string with data to print.
  */
-static int print_arg(wchar_t ch, const char* arg)
+static int print_arg(wchar_t ch, const char *arg)
 {
-	switch(ch) {
+	switch (ch) {
 	case 'd':
 		printf("%d", (int)(strtol(arg, NULL, 10)));
@@ -96,5 +96,5 @@
 static int process_ctl(wchar_t ch)
 {
-	switch(ch) {
+	switch (ch) {
 	case 'n':
 		printf("\n");
@@ -120,5 +120,5 @@
 {
 	unsigned int argc;
-	char* fmt;
+	char *fmt;
 	size_t pos, fmt_sz;
 	wchar_t ch;
@@ -142,5 +142,5 @@
 
 	while ((ch = str_decode(fmt, &pos, fmt_sz))) {
-		switch(ch) {
+		switch (ch) {
 
 		case '\\':
Index: uspace/app/bdsh/cmds/modules/pwd/pwd.c
===================================================================
--- uspace/app/bdsh/cmds/modules/pwd/pwd.c	(revision eb748a07badfc0c0a45c245ac989bd41eb3ca16a)
+++ uspace/app/bdsh/cmds/modules/pwd/pwd.c	(revision 2c4e1cc2aa4f1a4b249af5c661e93ac170ba5158)
@@ -61,5 +61,5 @@
 	if (vfs_cwd_get(buff, PATH_MAX) != EOK) {
 		cli_error(CL_EFAIL,
-			"Unable to determine the current working directory");
+		    "Unable to determine the current working directory");
 		free(buff);
 		return CMD_FAILURE;
Index: uspace/app/bdsh/cmds/modules/rm/rm.c
===================================================================
--- uspace/app/bdsh/cmds/modules/rm/rm.c	(revision eb748a07badfc0c0a45c245ac989bd41eb3ca16a)
+++ uspace/app/bdsh/cmds/modules/rm/rm.c	(revision 2c4e1cc2aa4f1a4b249af5c661e93ac170ba5158)
@@ -175,5 +175,5 @@
 	while ((dp = readdir(dirp))) {
 		int len = snprintf(buff, PATH_MAX - 1, "%s/%s", path, dp->d_name);
-		if (len > PATH_MAX-1) {
+		if (len > PATH_MAX - 1) {
 			// TODO: Do not enforce arbitrary static limits.
 			cli_error(CL_EFAIL, "Path too long for %s/%s", path, dp->d_name);
@@ -229,13 +229,13 @@
 		help_cmd_rm(HELP_SHORT);
 		printf(
-		"Usage:  %s [options] <path>\n"
-		"Options:\n"
-		"  -h, --help       A short option summary\n"
-		"  -v, --version    Print version information and exit\n"
-		"  -r, --recursive  Recursively remove sub directories\n"
-		"  -f, --force      Do not prompt prior to removing files\n"
-		"  -s, --safe       Stop if directories change during removal\n\n"
-		"Currently, %s is under development, some options don't work.\n",
-		cmdname, cmdname);
+		    "Usage:  %s [options] <path>\n"
+		    "Options:\n"
+		    "  -h, --help       A short option summary\n"
+		    "  -v, --version    Print version information and exit\n"
+		    "  -r, --recursive  Recursively remove sub directories\n"
+		    "  -f, --force      Do not prompt prior to removing files\n"
+		    "  -s, --safe       Stop if directories change during removal\n\n"
+		    "Currently, %s is under development, some options don't work.\n",
+		    cmdname, cmdname);
 	}
 	return;
@@ -255,5 +255,5 @@
 	if (argc < 2) {
 		cli_error(CL_EFAIL,
-			"%s: insufficient arguments. Try %s --help", cmdname, cmdname);
+		    "%s: insufficient arguments. Try %s --help", cmdname, cmdname);
 		return CMD_FAILURE;
 	}
@@ -293,5 +293,5 @@
 	if ((unsigned) optind == argc) {
 		cli_error(CL_EFAIL,
-			"%s: insufficient arguments. Try %s --help", cmdname, cmdname);
+		    "%s: insufficient arguments. Try %s --help", cmdname, cmdname);
 		rm_end(&rm);
 		return CMD_FAILURE;
@@ -317,7 +317,7 @@
 			break;
 		case RM_DIR:
-			if (! rm.recursive) {
+			if (!rm.recursive) {
 				printf("%s is a directory, use -r to remove it.\n", buff);
-				ret ++;
+				ret++;
 			} else {
 				ret += rm_recursive(buff);
Index: uspace/app/bdsh/input.c
===================================================================
--- uspace/app/bdsh/input.c	(revision eb748a07badfc0c0a45c245ac989bd41eb3ca16a)
+++ uspace/app/bdsh/input.c	(revision 2c4e1cc2aa4f1a4b249af5c661e93ac170ba5158)
@@ -101,5 +101,5 @@
 	}
 
-	if (tokens_length > 0 && tokens[tokens_length-1].type == TOKTYPE_SPACE) {
+	if (tokens_length > 0 && tokens[tokens_length - 1].type == TOKTYPE_SPACE) {
 		tokens_length--;
 	}
@@ -131,5 +131,5 @@
 		/* Ignore the first three tokens (from, file, pipe) and set from */
 		redir_from = tokens[2].text;
-		cmd_token_start = pipe_pos[0]+1;
+		cmd_token_start = pipe_pos[0] + 1;
 		processed_pipes++;
 	}
@@ -139,8 +139,8 @@
 	    (pipe_pos[processed_pipes] == tokens_length - 4 ||
 	    (pipe_pos[processed_pipes] == tokens_length - 5 &&
-	    tokens[tokens_length-4].type == TOKTYPE_SPACE )) &&
-	    str_cmp(tokens[tokens_length-3].text, "to") == 0) {
+	    tokens[tokens_length - 4].type == TOKTYPE_SPACE)) &&
+	    str_cmp(tokens[tokens_length - 3].text, "to") == 0) {
 		/* Ignore the last three tokens (pipe, to, file) and set to */
-		redir_to = tokens[tokens_length-1].text;
+		redir_to = tokens[tokens_length - 1].text;
 		cmd_token_end = pipe_pos[processed_pipes];
 		processed_pipes++;
Index: uspace/app/bdsh/tok.c
===================================================================
--- uspace/app/bdsh/tok.c	(revision eb748a07badfc0c0a45c245ac989bd41eb3ca16a)
+++ uspace/app/bdsh/tok.c	(revision 2c4e1cc2aa4f1a4b249af5c661e93ac170ba5158)
@@ -114,6 +114,5 @@
 			tok_push_token(tok);
 
-		}
-		else if (next_char == '|') {
+		} else if (next_char == '|') {
 			/* Pipes are tokens that are delimiters and should be
 			 * output as a separate token
@@ -137,6 +136,5 @@
 				return rc;
 			}
-		}
-		else if (next_char == '\'') {
+		} else if (next_char == '\'') {
 			/* A string starts with a quote (') and ends again with a quote.
 			 * A literal quote is written as ''
@@ -149,6 +147,5 @@
 				return rc;
 			}
-		}
-		else {
+		} else {
 			if (!tok_pending_chars(tok)) {
 				tok_start_token(tok, TOKTYPE_TEXT);
@@ -196,11 +193,9 @@
 				/* Swallow the additional one in the input */
 				tok_get_char(tok);
-			}
-			else {
+			} else {
 				/* The string end */
 				return tok_push_token(tok);
 			}
-		}
-		else {
+		} else {
 			rc = tok_push_char(tok, tok_get_char(tok));
 			if (rc != EOK) {
