Need to set optind to zero before calling getopt(). Otherwise we won't
correctly parse multiple create_eventset commands.

Signed-off-by: Kevin Corry <[EMAIL PROTECTED]>

--- libpfm-a/examples/pfmsetup.c        24 Apr 2007 04:46:33 -0000
+++ libpfm-b/examples/pfmsetup.c        26 Apr 2007 19:27:12 -0000
@@ -1324,6 +1324,7 @@
        memset(&set_arg, 0, sizeof(set_arg));
 
        opterr = 0;
+       optind = 0;
        while ((c = getopt_long_only(argc, argv, "",
                                     long_opts, NULL)) != EOF) {
                switch (c) {
_______________________________________________
perfmon mailing list
perfmon@linux.hpl.hp.com
http://www.hpl.hp.com/hosted/linux/mail-archives/perfmon/

Reply via email to