barebox-state: fix termination of long_options[]
From the getopt_long() documentation:

| The argument longopts must be an array of these structures, one for each
| long option. Terminate the array with an element containing all zeros.

Otherwise barebox-state will segfault for unknown options:

  % ./barebox-state --foo
  [1]    17946 segmentation fault (core dumped)  ./barebox-state --foo

Signed-off-by: Enrico Jorns <ejo@pengutronix.de>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
1 parent 2992ad0 commit 7974f832a0149abef5b981012ec6deba7093ac07
@Enrico Jorns Enrico Jorns authored on 15 May 2017
Showing 1 changed file
View
src/barebox-state.c