diff options
author | Rich Felker <dalias@aerifal.cx> | 2015-01-11 16:32:47 -0500 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2015-01-11 16:32:47 -0500 |
commit | 699d4532f6a8f792271c7f46608e2505ca3afc21 (patch) | |
tree | d22470164091885b9987df432e6c6527b07837cc /src/network/res_msend.c | |
parent | c574321d75f035ff6d2c18dfb7e3f70db60ba7bd (diff) | |
download | musl-699d4532f6a8f792271c7f46608e2505ca3afc21.tar.gz musl-699d4532f6a8f792271c7f46608e2505ca3afc21.tar.xz musl-699d4532f6a8f792271c7f46608e2505ca3afc21.zip |
fix regression in getopt_long support for non-option arguments
commit b72cd07f176b876aa51864d93aa8101477b1d732 added support for a this feature in getopt, but it was later broken in the case where getopt_long is used as a side effect of the changes made in commit 91184c4f16b143107fa9935edebe5d2b20bd70d8, which prevented the underlying getopt call from seeing the leading '-' or '+' character in optstring. this commit changes the logic in the getopt_long core to check for a leading colon, possibly after the leading '-' or '+', without depending on the latter having been skipped by the caller. a minor incorrectness in the return value for one error condition in getopt_long is also fixed when opterr has been set to zero but optstring has no leading ':'.
Diffstat (limited to 'src/network/res_msend.c')
0 files changed, 0 insertions, 0 deletions