diff options
author | Christopher Faylor <me@cgf.cx> | 2005-02-27 17:55:54 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2005-02-27 17:55:54 +0000 |
commit | 9dc6005ae22df40f4c195addf57192ea41a00057 (patch) | |
tree | 0b7f9de48e055e4c004b2713093343ab9c6e8cce | |
parent | 2391eea57e01f6d44f5bff134171ccc2ce9803a9 (diff) | |
download | cygnal-9dc6005ae22df40f4c195addf57192ea41a00057.tar.gz cygnal-9dc6005ae22df40f4c195addf57192ea41a00057.tar.bz2 cygnal-9dc6005ae22df40f4c195addf57192ea41a00057.zip |
* regtool.cc (opts): The argument to 'K' is not optional.
(main): Revert previous change. Just let getopt deal with missing argument.
-rw-r--r-- | winsup/utils/ChangeLog | 6 | ||||
-rw-r--r-- | winsup/utils/regtool.cc | 7 |
2 files changed, 8 insertions, 5 deletions
diff --git a/winsup/utils/ChangeLog b/winsup/utils/ChangeLog index 7f980c690..31bf8ecbc 100644 --- a/winsup/utils/ChangeLog +++ b/winsup/utils/ChangeLog @@ -1,5 +1,11 @@ 2005-02-27 Christopher Faylor <cgf@timesys.com> + * regtool.cc (opts): The argument to 'K' is not optional. + (main): Revert previous change. Just let getopt deal with missing + argument. + +2005-02-27 Christopher Faylor <cgf@timesys.com> + * regtool.cc (main): Avoid a SEGV when nothing follows -K. 2005-02-26 Christopher Faylor <cgf@timesys.com> diff --git a/winsup/utils/regtool.cc b/winsup/utils/regtool.cc index 6954c6556..45263e369 100644 --- a/winsup/utils/regtool.cc +++ b/winsup/utils/regtool.cc @@ -47,7 +47,7 @@ static struct option longopts[] = {NULL, 0, NULL, 0} }; -static char opts[] = "ehiklmpqsvVK::"; +static char opts[] = "ehiklmpqsvVK:"; int listwhat = 0; int postfix = 0; @@ -674,10 +674,7 @@ main (int argc, char **_argv) print_version (); exit (0); case 'K': - if (!optarg) - usage (); - else - key_sep = *optarg; + key_sep = *optarg; break; default : usage (); |