trace: remove unneeded checks in internal API
authorDavid Marchand <david.marchand@redhat.com>
Thu, 30 Apr 2020 15:33:18 +0000 (17:33 +0200)
committerDavid Marchand <david.marchand@redhat.com>
Wed, 6 May 2020 11:50:32 +0000 (13:50 +0200)
commitd73b9f83cd432e77582e7f3b0517a9cbf75dd50f
treeb3392c5eaa991f232d0ae57426dac0485e2aab62
parentb86aebcb6f22a3f282eaa5624764f827988b48b9
trace: remove unneeded checks in internal API

The trace framework can be configured via 4 EAL options:
- --trace which calls eal_trace_args_save,
- --trace-dir which calls eal_trace_dir_args_save,
- --trace-bufsz which calls eal_trace_bufsz_args_save,
- --trace-mode which calls eal_trace_mode_args_save.

Those 4 internal callbacks are getting passed a non NULL value:
optarg won't be NULL since those options are declared with
required_argument (man getopt_long).

eal_trace_bufsz_args_save() already trusted passed value, align the other
3 internal callbacks.

Coverity issue: 357768
Fixes: 8c8066ea6a7b ("trace: add trace mode configuration parameter")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Sunil Kumar Kori <skori@marvell.com>
lib/librte_eal/common/eal_common_trace_utils.c