@mlschroe commented on this pull request.


> +    lua_newtable(L);
+    if (opts) {
+       int c, argc = argvCount(args);
+
+/* glibc uses optind 0 for (re)initializing internal structures, sigh */
+#ifdef __GLIBC__
+       optind = 0;
+#else
+       optind = 1;
+#endif
+       while ((c = getopt(argc, args, opts)) != -1) {
+           char key[2] = { c, '\0' };
+           if (c == '?' || strchr(opts, c) == NULL) {
+               rpmlog(RPMLOG_ERR, _("Unknown option %c in %s(%s)\n"),
+                       (char)optopt, name, opts);
+               lua_pop(L, 2);

Shouldn't that pop just one element?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/1383#pullrequestreview-504573607
_______________________________________________
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint

Reply via email to