lib: fix tpm2_print_usage() when tools have no options/args
lib: fix tpm2_print_usage() when tools have no options/args

For tools that takes no options and arguments, its struct tpm2_options is
NULL so trying to access it will lead to a NULL pointer dereference error.

This is checked in the main() function before calling tpm2_print_usage(),
but it was checked when tpm2_print_usage() was added as a fallback to the
--help option when executing the man pager fails.

Instead of relying of the caller to do the check, make tpm2_print_usage()
robust enough to cope with being called with a NULL struct tpm2_options.

After all, it makes no sense to print a usage text for a tool that takes
neither options nor arguments.

Fixes: #760

Reported-by: Emmanuel Deloget <55525e1b3dfd8787fd202aed45fb04494e3242d0@free.fr>
Signed-off-by: Javier Martinez Canillas <8fdf2abf85d34ea8f3f979ef25dc1f25d94aca29@redhat.com>

01org/tpm2.0-tools,martinezjavier/tpm2-tools,01org/tpm2.0-tools,01org/tpm2.0-tools,martinezjavier/tpm2-tools,martinezjavier/tpm2-tools,martinezjavier/tpm2-tools