musl - musl - an implementation of the standard library for Linux-based systems

index : musl
musl - an implementation of the standard library for Linux-based systems
summary refs log tree commit diff
path: root/src/stdio
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2018年08月22日 19:29:56 -0400
committerRich Felker <dalias@aerifal.cx>2018年08月22日 19:29:56 -0400
commit6aeb131b4c1aee30d7f7125a8a88ce6f41172f01 (patch)
treecf39f9b7af03f4525a4aa297317bbcf754891116 /src/stdio
parent184ef36f85d66583306413727fc5f39557d391e4 (diff)
downloadmusl-6aeb131b4c1aee30d7f7125a8a88ce6f41172f01.tar.gz
getopt: update optarg and optind correctly on missing argument
the text of the specification for getopt's handling of options that require an argument, which requires updating optarg and optind, does not exclude the error case where the end of the argument list has been reached. in that case, it is expected that optarg be assigned argv[argc] (normally null) and optind be incremented by 2, resulting in a value of argc+1.
Diffstat (limited to 'src/stdio')
0 files changed, 0 insertions, 0 deletions
generated by cgit v1.2.1 (git 2.18.0) at 2025年10月05日 13:51:17 +0000

AltStyle によって変換されたページ (->オリジナル) /