Merged.
--Subrata
On Thu, 2008-02-14 at 13:37 +0100, Sebastien Dugue wrote:
> The '::' optional argument specifier for getopt used by the '-v' option
> is a GNU extension, is not portable and does not work. For example it's
> not even described in the Debian getopt(3) manpage.
> Make the '-v' option require a non optional argument.
>
> Signed-off-by: Sebastien Dugue <[EMAIL PROTECTED]>
> Cc: Darren Hart <[EMAIL PROTECTED]>
> Cc: Tim Chavez <[EMAIL PROTECTED]>
> ---
> testcases/realtime/lib/librttest.c | 7 ++-----
> 1 files changed, 2 insertions(+), 5 deletions(-)
>
> diff --git a/testcases/realtime/lib/librttest.c
> b/testcases/realtime/lib/librttest.c
> index c8c963b..6fd03ed 100644
> --- a/testcases/realtime/lib/librttest.c
> +++ b/testcases/realtime/lib/librttest.c
> @@ -84,7 +84,7 @@ int rt_init(const char *options, int (*parse_arg)(int
> option, char *value), int
> int c;
> opterr = 0;
> char *all_options, *opt_ptr;
> - static const char my_options[] = "b:p:v::";
> + static const char my_options[] = "b:p:v:";
>
> if (options) {
> opt_ptr = all_options = (char *)malloc(sizeof(my_options) +
> strlen(options) + 1);
> @@ -114,10 +114,7 @@ int rt_init(const char *options, int (*parse_arg)(int
> option, char *value), int
> _use_pi = atoi(optarg);
> break;
> case 'v':
> - if (optarg)
> - _dbg_lvl = atoi(optarg);
> - else
> - _dbg_lvl++;
> + _dbg_lvl = atoi(optarg);
> break;
> default:
> if (parse_arg) {
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list