All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH BlueZ] shared/shell: Fix short option parsing
       [not found] <20180322031300.32156-1-inga.stotland@intel.com>
@ 2018-03-22 10:30 ` Luiz Augusto von Dentz
  0 siblings, 0 replies; only message in thread
From: Luiz Augusto von Dentz @ 2018-03-22 10:30 UTC (permalink / raw)
  To: Inga Stotland; +Cc: linux-bluetooth

Hi Inga,

On Thu, Mar 22, 2018 at 5:13 AM, Inga Stotland <inga.stotland@intel.com> wrote:
> The index value used for detecting and validating a short option
> was not reset after processing a first short option.
> This prevented the correct parsing of additional short options.
> Fixed by resetting the index value back to original after each
> iteration.
> ---
>  src/shared/shell.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/src/shared/shell.c b/src/shared/shell.c
> index 9cd8d2567..10f26264f 100644
> --- a/src/shared/shell.c
> +++ b/src/shared/shell.c
> @@ -957,6 +957,8 @@ void bt_shell_init(int argc, char **argv, const struct bt_shell_opt *opt)
>
>                         *opt->optarg[index - offset] = optarg;
>                 }
> +
> +               index = -1;
>         }
>
>         data.argc = argc - optind;
> --
> 2.13.6

Applied, thanks.

-- 
Luiz Augusto von Dentz

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2018-03-22 10:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20180322031300.32156-1-inga.stotland@intel.com>
2018-03-22 10:30 ` [PATCH BlueZ] shared/shell: Fix short option parsing Luiz Augusto von Dentz

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.