style fixes
[oweals/busybox.git] / shell / cmdedit.c
index 68772fe0551edce7b4fd19373fa2fe5262917f2c..7af73ec6e7bec9dfe055f7cee8531cd28dd2ca14 100644 (file)
@@ -58,9 +58,8 @@
 
 #if ENABLE_FEATURE_COMMAND_EDITING
 
-#if ENABLE_FEATURE_COMMAND_USERNAME_COMPLETION || ENABLE_FEATURE_SH_FANCY_PROMPT
-#define ENABLE_FEATURE_GETUSERNAME_AND_HOMEDIR 1
-#endif
+#define ENABLE_FEATURE_GETUSERNAME_AND_HOMEDIR \
+(ENABLE_FEATURE_COMMAND_USERNAME_COMPLETION || ENABLE_FEATURE_SH_FANCY_PROMPT)
 
 /* Maximum length of the linked list for the command line history */
 #if !ENABLE_FEATURE_COMMAND_HISTORY
@@ -77,7 +76,6 @@ static int n_history;
 static int cur_history;
 #endif
 
-//#include <termios.h>
 #define setTermSettings(fd,argp) tcsetattr(fd, TCSANOW, argp)
 #define getTermSettings(fd,argp) tcgetattr(fd, argp);
 
@@ -1801,7 +1799,7 @@ rewrite_line:
                        /* After max history, remove the oldest command */
                if (i >= MAX_HISTORY) {
                        free(history[0]);
-                       for(i = 0; i < MAX_HISTORY-1; i++)
+                       for (i = 0; i < MAX_HISTORY-1; i++)
                                history[i] = history[i+1];
                }
                history[i++] = xstrdup(command);