examples/performance-thread: enhance getopt_long usage
authorIbtisam Tariq <ibtisam.tariq@emumba.com>
Thu, 4 Feb 2021 07:34:17 +0000 (07:34 +0000)
committerDavid Marchand <david.marchand@redhat.com>
Tue, 23 Mar 2021 12:00:29 +0000 (13:00 +0100)
commit745d01a26a091ea3270ac542e579fe6fee219d19
tree3ec629c1dff6a54c5e0172693d239d1de8a9d1f3
parent3bb3ebb51b789d4ecb417cbdb1dce5c7211f6f18
examples/performance-thread: enhance getopt_long usage

Instead of using getopt_long return value, strcmp was used to
compare the input parameters with the struct option array. This
patch get rid of all those strcmp by directly binding each longopt
with an int enum. This is to improve readability and consistency in
all examples.

Bugzilla ID: 238

Reported-by: David Marchand <david.marchand@redhat.com>
Signed-off-by: Ibtisam Tariq <ibtisam.tariq@emumba.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
examples/performance-thread/l3fwd-thread/main.c