[POSIX defines optarg only for options with 
arguments](https://pubs.opengroup.org/onlinepubs/000095399/functions/getopt.html)
 and callback() is expecting optarg to be NULL for options without arguments, 
however, at least on musl optarg will carry a pointer to the argument of the 
previous option with argument.  This commit makes the behaviour deterministic 
and expected.
You can view, comment on, or merge this pull request online at:

  https://github.com/rpm-software-management/rpm/pull/2377

-- Commit Summary --

  * support for POSIX getopt() behaviour

-- File Changes --

    M rpmio/rgetopt.c (2)

-- Patch Links --

https://github.com/rpm-software-management/rpm/pull/2377.patch
https://github.com/rpm-software-management/rpm/pull/2377.diff

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2377
You are receiving this because you are subscribed to this thread.

Message ID: <rpm-software-management/rpm/pull/2...@github.com>
_______________________________________________
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint

Reply via email to