diff mbox

vl.c: optimized code format

Message ID 1421126324-2036-1-git-send-email-rudy.zhangmin@huawei.com
State New
Headers show

Commit Message

Zhang Min Jan. 13, 2015, 5:18 a.m. UTC
From: Rudy Zhang <rudy.zhangmin@huawei.com>

There are several tab characters in the 'vl.c' file. It leads to
to misalignment of the code. So, let the space instead of the tab.

Signed-off-by: Rudy Zhang <rudy.zhangmin@huawei.com>
---
 vl.c | 42 +++++++++++++++++++++---------------------
 1 file changed, 21 insertions(+), 21 deletions(-)

Comments

Markus Armbruster Jan. 13, 2015, 9:38 a.m. UTC | #1
Zhang Min <rudy.zhangmin@huawei.com> writes:

> From: Rudy Zhang <rudy.zhangmin@huawei.com>
>
> There are several tab characters in the 'vl.c' file. It leads to
> to misalignment of the code. So, let the space instead of the tab.
>
> Signed-off-by: Rudy Zhang <rudy.zhangmin@huawei.com>

While we don't want tabs in new code, we generally leave existing ones
alone until we need to touch the line anyway, or the tabs get in the way
somehow.
Stefan Weil Jan. 13, 2015, 12:47 p.m. UTC | #2
Am 13.01.2015 um 10:38 schrieb Markus Armbruster:
> Zhang Min <rudy.zhangmin@huawei.com> writes:
>
>> From: Rudy Zhang <rudy.zhangmin@huawei.com>
>>
>> There are several tab characters in the 'vl.c' file. It leads to
>> to misalignment of the code. So, let the space instead of the tab.
>>
>> Signed-off-by: Rudy Zhang <rudy.zhangmin@huawei.com>
> While we don't want tabs in new code, we generally leave existing ones
> alone until we need to touch the line anyway, or the tabs get in the way
> somehow.

True. In this special case, there is already a similar patch queued for 
qemu-trivial, so Zhang Min's patch is not needed. As far as I know, that 
previous patch was sent to prepare further modifications in vl.c, that's 
why I acked it.

Stefan
diff mbox

Patch

diff --git a/vl.c b/vl.c
index 7786b2f..05a6d56 100644
--- a/vl.c
+++ b/vl.c
@@ -743,7 +743,7 @@  int qemu_timedate_diff(struct tm *tm)
             struct tm tmp = *tm;
             tmp.tm_isdst = -1; /* use timezone to figure it out */
             seconds = mktime(&tmp);
-	}
+        }
     else
         seconds = mktimegm(tm) + rtc_date_offset;
 
@@ -2786,7 +2786,7 @@  int main(int argc, char **argv, char **envp)
         if (optind >= argc)
             break;
         if (argv[optind][0] != '-') {
-	    hda_opts = drive_add(IF_DEFAULT, 0, argv[optind++], HD_OPTS);
+            hda_opts = drive_add(IF_DEFAULT, 0, argv[optind++], HD_OPTS);
         } else {
             const QEMUOption *popt;
 
@@ -2834,15 +2834,15 @@  int main(int argc, char **argv, char **envp)
                 if (drive_def(optarg) == NULL) {
                     exit(1);
                 }
-	        break;
+                break;
             case QEMU_OPTION_set:
                 if (qemu_set_option(optarg) != 0)
                     exit(1);
-	        break;
+                break;
             case QEMU_OPTION_global:
                 if (qemu_global_option(optarg) != 0)
                     exit(1);
-	        break;
+                break;
             case QEMU_OPTION_mtdblock:
                 drive_add(IF_MTD, -1, optarg, MTD_OPTS);
                 break;
@@ -2894,7 +2894,7 @@  int main(int argc, char **argv, char **envp)
                         fprintf(stderr, "qemu: invalid physical CHS format\n");
                         exit(1);
                     }
-		    if (hda_opts != NULL) {
+                    if (hda_opts != NULL) {
                         char num[16];
                         snprintf(num, sizeof(num), "%d", cyls);
                         qemu_opt_set(hda_opts, "cyls", num);
@@ -3147,9 +3147,9 @@  int main(int argc, char **argv, char **envp)
             case QEMU_OPTION_S:
                 autostart = 0;
                 break;
-	    case QEMU_OPTION_k:
-		keyboard_layout = optarg;
-		break;
+            case QEMU_OPTION_k:
+                keyboard_layout = optarg;
+                break;
             case QEMU_OPTION_localtime:
                 rtc_utc = 0;
                 break;
@@ -3357,9 +3357,9 @@  int main(int argc, char **argv, char **envp)
             case QEMU_OPTION_debugcon:
                 add_device_config(DEV_DEBUGCON, optarg);
                 break;
-	    case QEMU_OPTION_loadvm:
-		loadvm = optarg;
-		break;
+            case QEMU_OPTION_loadvm:
+                loadvm = optarg;
+                break;
             case QEMU_OPTION_full_screen:
                 full_screen = 1;
                 break;
@@ -3474,7 +3474,7 @@  int main(int argc, char **argv, char **envp)
                     exit(1);
                 }
                 break;
-	    case QEMU_OPTION_vnc:
+            case QEMU_OPTION_vnc:
 #ifdef CONFIG_VNC
                 display_remote++;
                 vnc_display = optarg;
@@ -3512,11 +3512,11 @@  int main(int argc, char **argv, char **envp)
                 }
                 qemu_uuid_set = true;
                 break;
-	    case QEMU_OPTION_option_rom:
-		if (nb_option_roms >= MAX_OPTION_ROMS) {
-		    fprintf(stderr, "Too many option ROMs\n");
-		    exit(1);
-		}
+            case QEMU_OPTION_option_rom:
+                if (nb_option_roms >= MAX_OPTION_ROMS) {
+                    fprintf(stderr, "Too many option ROMs\n");
+                    exit(1);
+                }
                 opts = qemu_opts_parse(qemu_find_opts("option-rom"), optarg, 1);
                 if (!opts) {
                     exit(1);
@@ -3528,8 +3528,8 @@  int main(int argc, char **argv, char **envp)
                     fprintf(stderr, "Option ROM file is not specified\n");
                     exit(1);
                 }
-		nb_option_roms++;
-		break;
+                nb_option_roms++;
+                break;
             case QEMU_OPTION_semihosting:
                 semihosting_enabled = 1;
                 semihosting_target = SEMIHOSTING_TARGET_AUTO;
@@ -4248,7 +4248,7 @@  int main(int argc, char **argv, char **envp)
     /* init local displays */
     switch (display_type) {
     case DT_NOGRAPHIC:
-        (void)ds;	/* avoid warning if no display is configured */
+        (void)ds;        /* avoid warning if no display is configured */
         break;
 #if defined(CONFIG_CURSES)
     case DT_CURSES: