]> sigrok.org Git - pulseview.git/blobdiff - main.cpp
Connect dialog: Let the device list occupy only the minimum space needed
[pulseview.git] / main.cpp
index cdc750aa80aade18b21916708463189c78a41f9a..780371b9945b396514ffeac40b0678ebca946a33 100644 (file)
--- a/main.cpp
+++ b/main.cpp
@@ -254,11 +254,11 @@ int main(int argc, char *argv[])
                        break;
                }
        }
+       argc -= optind;
+       argv += optind;
 
-       while (argc - optind > 0) {
-               open_files.push_back(argv[optind]);
-               optind++;
-       }
+       for (int i = 0; i < argc; i++)
+               open_files.push_back(argv[i]);
 
        // Prepare the global settings since logging needs them early on
        pv::GlobalSettings settings;