diff --git a/libbb/compare_string_array.c b/libbb/compare_string_array.c
index fc077b3..e4191e3 100644
--- a/libbb/compare_string_array.c
+++ b/libbb/compare_string_array.c
@@ -17,7 +17,7 @@
 #include <string.h>
 
 /* returns the array number of the string */
-extern int 
+extern int
 compare_string_array(const char * const string_array[], const char *key)
 {
 	int i;
diff --git a/libbb/copy_file.c b/libbb/copy_file.c
index 991fa8f..0763b45 100644
--- a/libbb/copy_file.c
+++ b/libbb/copy_file.c
@@ -119,7 +119,7 @@
 			status = -1;
 		}
 	} else if (S_ISREG(source_stat.st_mode) || (flags & FILEUTILS_DEREFERENCE))
-   	{
+	{
 		int src_fd;
 		int dst_fd;
 #ifdef CONFIG_FEATURE_PRESERVE_HARDLINKS
diff --git a/libbb/copyfd.c b/libbb/copyfd.c
index 0b85088..fcae8d3 100644
--- a/libbb/copyfd.c
+++ b/libbb/copyfd.c
@@ -32,7 +32,7 @@
 	while (!size || total < size)
 	{
 		ssize_t wrote, xread;
-		
+
 		xread = safe_read(src_fd, buffer,
 				(!size || size - total > BUFSIZ) ? BUFSIZ : size - total);
 
@@ -53,7 +53,7 @@
 			break;
 		}
 	}
-		
+
 out:
 	RELEASE_CONFIG_BUFFER(buffer);
 
diff --git a/libbb/correct_password.c b/libbb/correct_password.c
index 039379a..bb9e7d3 100644
--- a/libbb/correct_password.c
+++ b/libbb/correct_password.c
@@ -61,7 +61,7 @@
 	}
 	else
 #endif
-    	correct = pw-> pw_passwd;
+		correct = pw-> pw_passwd;
 
 	if ( correct == 0 || correct[0] == '\0' )
 		return 1;
diff --git a/libbb/dump.c b/libbb/dump.c
index 98f004f..7d92308 100644
--- a/libbb/dump.c
+++ b/libbb/dump.c
@@ -695,7 +695,7 @@
 
 	/* start new linked list of format units */
 	/* NOSTRICT */
- 	tfs = (FS *) xcalloc(1,sizeof(FS)); /*DBU:[dave@cray.com] start out NULL */
+	tfs = (FS *) xcalloc(1,sizeof(FS)); /*DBU:[dave@cray.com] start out NULL */
 	if (!bb_dump_fshead) {
 		bb_dump_fshead = tfs;
 	} else {
diff --git a/libbb/hash_fd.c b/libbb/hash_fd.c
index 3445a25..39825b3 100644
--- a/libbb/hash_fd.c
+++ b/libbb/hash_fd.c
@@ -212,7 +212,7 @@
 		ctx->wbuf[cnt++] = 0;
 
 	/* assemble the eight byte counter in the buffer in big-endian  */
-	/* format                                                       */
+	/* format					               */
 
 	ctx->wbuf[14] = swap_b32((ctx->count[1] << 3) | (ctx->count[0] >> 29));
 	ctx->wbuf[15] = swap_b32(ctx->count[0] << 3);
@@ -492,12 +492,12 @@
 
 #  define OP(a, b, c, d, s, T)	\
       do	\
-        {	\
+	{	\
 	  a += FF (b, c, d) + (*cwp++ = SWAP (*words)) + T;	\
 	  ++words;	\
 	  CYCLIC (a, s);	\
 	  a += b;	\
-        }	\
+	}	\
       while (0)
 
 		/* It is unfortunate that C does not provide an operator for
diff --git a/libbb/inet_common.c b/libbb/inet_common.c
index 321322d..3ff8197 100644
--- a/libbb/inet_common.c
+++ b/libbb/inet_common.c
@@ -206,8 +206,8 @@
 
 #ifndef IN6_IS_ADDR_UNSPECIFIED
 # define IN6_IS_ADDR_UNSPECIFIED(a) \
-        (((__u32 *) (a))[0] == 0 && ((__u32 *) (a))[1] == 0 && \
-         ((__u32 *) (a))[2] == 0 && ((__u32 *) (a))[3] == 0)
+	(((__u32 *) (a))[0] == 0 && ((__u32 *) (a))[1] == 0 && \
+	 ((__u32 *) (a))[2] == 0 && ((__u32 *) (a))[3] == 0)
 #endif
 
 
diff --git a/libbb/loop.c b/libbb/loop.c
index 6c3144a..09b2bea 100644
--- a/libbb/loop.c
+++ b/libbb/loop.c
@@ -56,7 +56,7 @@
 	int fd;
 	bb_loop_info loopinfo;
 	char *dev=0;
-	
+
 	if ((fd = open(device, O_RDONLY)) < 0) return 0;
 	if (!ioctl(fd, BB_LOOP_GET_STATUS, &loopinfo))
 		dev=bb_xasprintf("%ld %s", (long) loopinfo.lo_offset,
@@ -64,7 +64,7 @@
 	close(fd);
 
 	return dev;
-}	
+}
 
 
 int del_loop(const char *device)
@@ -74,7 +74,7 @@
 	if ((fd = open(device, O_RDONLY)) < 0) return 1;
 	rc=ioctl(fd, LOOP_CLR_FD, 0);
 	close(fd);
-	
+
 	return rc;
 }
 
diff --git a/libbb/printf.c b/libbb/printf.c
index 4451273..2cba317 100644
--- a/libbb/printf.c
+++ b/libbb/printf.c
@@ -65,7 +65,7 @@
 /* Using either the original stdio implementation (from dev86) or
  * my original stdio rewrite.  Macros were:
  * #define ferror(fp)	(((fp)->mode&__MODE_ERR) != 0)
- * #define feof(fp)   	(((fp)->mode&__MODE_EOF) != 0)
+ * #define feof(fp)		(((fp)->mode&__MODE_EOF) != 0)
  * #define clearerr(fp)	((fp)->mode &= ~(__MODE_EOF|__MODE_ERR),0)
  */
 #define SET_FERROR_UNLOCKED(S)    ((S)->mode |= __MODE_ERR)
diff --git a/libbb/process_escape_sequence.c b/libbb/process_escape_sequence.c
index 28b1e36..1b7b6d1 100644
--- a/libbb/process_escape_sequence.c
+++ b/libbb/process_escape_sequence.c
@@ -70,7 +70,7 @@
 		if (d >= base) {
 #ifdef WANT_HEX_ESCAPES
 			if ((base == 16) && (!--num_digits)) {
-/* 				return '\\'; */
+/*				return '\\'; */
 				--q;
 			}
 #endif
diff --git a/libbb/run_shell.c b/libbb/run_shell.c
index 6d084ee..d5dc37b 100644
--- a/libbb/run_shell.c
+++ b/libbb/run_shell.c
@@ -46,7 +46,7 @@
 void
 renew_current_security_context(void)
 {
-  if  (current_sid)  
+  if  (current_sid)
     freecon(current_sid);  /* Release old context  */
 
   getcon(&current_sid);  /* update */
@@ -56,7 +56,7 @@
 void
 set_current_security_context(security_context_t sid)
 {
-  if  (current_sid)  
+  if  (current_sid)
     freecon(current_sid);  /* Release old context  */
 
   current_sid=sid;
@@ -84,7 +84,7 @@
 
 	args [0] = bb_get_last_path_component ( bb_xstrdup ( shell ));
 
-	if ( loginshell ) 
+	if ( loginshell )
 		args [0] = bb_xasprintf ("-%s", args [0]);
 
 	if ( command ) {
diff --git a/libbb/setup_environment.c b/libbb/setup_environment.c
index aeb285a..dfab786 100644
--- a/libbb/setup_environment.c
+++ b/libbb/setup_environment.c
@@ -58,7 +58,7 @@
 		 * to change to that directory.  There is no "default" home
 		 * directory.
 		 * Some systems default to HOME=/
-		 */		
+		 */
 		if ( chdir ( pw-> pw_dir )) {
 			if ( chdir ( "/" )) {
 				syslog ( LOG_WARNING, "unable to cd to %s' for user %s'\n", pw-> pw_dir, pw-> pw_name );
@@ -81,7 +81,7 @@
 	}
 	else if ( changeenv ) {
 		/* Set HOME, SHELL, and if not becoming a super-user,
-	   	   USER and LOGNAME.  */
+		   USER and LOGNAME.  */
 		xsetenv ( "HOME",  pw-> pw_dir );
 		xsetenv ( "SHELL", shell );
 		if  ( pw-> pw_uid ) {
diff --git a/libbb/xgetlarg.c b/libbb/xgetlarg.c
index f24492b..f332bb3 100644
--- a/libbb/xgetlarg.c
+++ b/libbb/xgetlarg.c
@@ -22,7 +22,7 @@
 	assert(arg!=NULL);
 
 	/* Don't allow leading whitespace.
-	 * Wrap isspace in () to make sure we call the 
+	 * Wrap isspace in () to make sure we call the
 	 * function rather than the macro. */
 	if ((isspace)(*arg)) {
 		bb_show_usage();
diff --git a/libbb/xgetularg.c b/libbb/xgetularg.c
index e900854..8d793f3 100644
--- a/libbb/xgetularg.c
+++ b/libbb/xgetularg.c
@@ -75,7 +75,7 @@
 				++e;
 				r *= suffixes->mult;
 				break;
- 			}
+			}
 			++suffixes;
 		}
 	}
diff --git a/libbb/xreadlink.c b/libbb/xreadlink.c
index 49823fa..b3e3eda 100644
--- a/libbb/xreadlink.c
+++ b/libbb/xreadlink.c
@@ -14,7 +14,7 @@
 #include "libbb.h"
 
 extern char *xreadlink(const char *path)
-{   
+{
 	static const int GROWBY = 80; /* how large we will grow strings by */
 
 	char *buf = NULL;
