]> git.proxmox.com Git - qemu.git/blobdiff - cmd.c
virtio-blk: Avoid zeroing every request structure
[qemu.git] / cmd.c
diff --git a/cmd.c b/cmd.c
index d86ba7ccb421608907c8ec8b3c4eba2c4ae3384d..2336334eea8597caf4bf34b3e5b84c8e6d729c0d 100644 (file)
--- a/cmd.c
+++ b/cmd.c
 #include <ctype.h>
 #include <errno.h>
 #include <sys/time.h>
+#include <getopt.h>
 
 #include "cmd.h"
 
 #define _(x)   x       /* not gettext support yet */
 
-extern int optind;
-
 /* from libxcmd/command.c */
 
 cmdinfo_t      *cmdtab;
@@ -288,9 +287,10 @@ static char *qemu_strsep(char **input, const char *delim)
 {
     char *result = *input;
     if (result != NULL) {
-    char *p = result;
-    for (p = result; *p != '\0'; p++) {
-        if (strchr(delim, *p)) {
+        char *p;
+
+        for (p = result; *p != '\0'; p++) {
+            if (strchr(delim, *p)) {
                 break;
             }
         }