* regtool.cc (opts): The argument to 'K' is not optional.
(main): Revert previous change. Just let getopt deal with missing argument.
This commit is contained in:
parent
2391eea57e
commit
9dc6005ae2
|
@ -1,3 +1,9 @@
|
||||||
|
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>
|
2005-02-27 Christopher Faylor <cgf@timesys.com>
|
||||||
|
|
||||||
* regtool.cc (main): Avoid a SEGV when nothing follows -K.
|
* regtool.cc (main): Avoid a SEGV when nothing follows -K.
|
||||||
|
|
|
@ -47,7 +47,7 @@ static struct option longopts[] =
|
||||||
{NULL, 0, NULL, 0}
|
{NULL, 0, NULL, 0}
|
||||||
};
|
};
|
||||||
|
|
||||||
static char opts[] = "ehiklmpqsvVK::";
|
static char opts[] = "ehiklmpqsvVK:";
|
||||||
|
|
||||||
int listwhat = 0;
|
int listwhat = 0;
|
||||||
int postfix = 0;
|
int postfix = 0;
|
||||||
|
@ -674,9 +674,6 @@ main (int argc, char **_argv)
|
||||||
print_version ();
|
print_version ();
|
||||||
exit (0);
|
exit (0);
|
||||||
case 'K':
|
case 'K':
|
||||||
if (!optarg)
|
|
||||||
usage ();
|
|
||||||
else
|
|
||||||
key_sep = *optarg;
|
key_sep = *optarg;
|
||||||
break;
|
break;
|
||||||
default :
|
default :
|
||||||
|
|
Loading…
Reference in New Issue