From 5b1ca37d3b2328db19264cafa32da1670747f49d Mon Sep 17 00:00:00 2001 From: midipix Date: Wed, 21 Aug 2019 16:22:02 -0400 Subject: driver: mdso_get_driver_ctx(): added missing check when (nunits == 0). --- src/driver/mdso_driver_ctx.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/driver') diff --git a/src/driver/mdso_driver_ctx.c b/src/driver/mdso_driver_ctx.c index 32683b6..30d1ba7 100644 --- a/src/driver/mdso_driver_ctx.c +++ b/src/driver/mdso_driver_ctx.c @@ -323,11 +323,12 @@ int mdso_get_driver_ctx( cctx.drvflags |= MDSO_DRIVER_QUAD_PTR; - if (!nunits && !(cctx.drvflags & MDSO_DRIVER_VERSION)) - return mdso_driver_usage( - fdctx->fderr, - program,0, - optv,meta); + if (cctx.drvflags & MDSO_DRIVER_VERBOSITY_USAGE) + if (!nunits && !(cctx.drvflags & MDSO_DRIVER_VERSION)) + return mdso_driver_usage( + fdctx->fderr, + program,0, + optv,meta); if (pretty && !strcmp(pretty,"yaml")) cctx.fmtflags |= MDSO_PRETTY_YAML; -- cgit v1.2.3