Blob Blame History Raw
commit 0f0ceb44be247cf894422d1dab6a67b474e77d12
Author: Andrew Beekhof <andrew@beekhof.net>
Date:   Thu Jan 15 13:43:48 2015 +1100

    Fix: cli: Ensure subsequent unknown long options are correctly detected

diff --git a/lib/common/utils.c b/lib/common/utils.c
index d70778d..50b5e91 100644
--- a/lib/common/utils.c
+++ b/lib/common/utils.c
@@ -1802,6 +1802,7 @@ crm_get_option_long(int argc, char **argv, int *index, const char **longname)
         long_opts = crm_create_long_opts(crm_long_options);
     }
 
+    *index = 0;
     if (long_opts) {
         int flag = getopt_long(argc, argv, crm_short_options, long_opts, index);