Merge "Replace a segfault with a warning." into jb-mr1-dev
diff --git a/adb/commandline.c b/adb/commandline.c
index 10b2332..24cbb5a 100644
--- a/adb/commandline.c
+++ b/adb/commandline.c
@@ -965,7 +965,7 @@
                 argc--;
                 argv++;
             } else {
-                product = argv[1] + 2;
+                product = argv[0] + 2;
             }
             gProductOutPath = find_product_out_path(product);
             if (gProductOutPath == NULL) {
diff --git a/toolbox/vmstat.c b/toolbox/vmstat.c
index 600f136..4086ed0 100644
--- a/toolbox/vmstat.c
+++ b/toolbox/vmstat.c
@@ -75,7 +75,7 @@
     int toggle, count;
     int i;
 
-    iterations = 0;
+    iterations = -1;
     delay = 1;
     header_interval = 20;
 
@@ -119,7 +119,7 @@
     if (!header_interval)
         print_header();
     read_state(&s[1 - toggle]);
-    while ((iterations == 0) || (iterations-- > 0)) {
+    while ((iterations < 0) || (iterations-- > 0)) {
         sleep(delay);
         read_state(&s[toggle]);
         if (header_interval) {