summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2019-08-21 16:22:02 -0400
committermidipix <writeonce@midipix.org>2019-08-21 16:22:02 -0400
commit5b1ca37d3b2328db19264cafa32da1670747f49d (patch)
tree4b90a6c077c27629f325b47eae05b2487c099b79 /src
parent33eb75e8897f0f66ae5167e808ef6d92b0d1a539 (diff)
downloadmdso-5b1ca37d3b2328db19264cafa32da1670747f49d.tar.bz2
mdso-5b1ca37d3b2328db19264cafa32da1670747f49d.tar.xz
driver: mdso_get_driver_ctx(): added missing check when (nunits == 0).
Diffstat (limited to 'src')
-rw-r--r--src/driver/mdso_driver_ctx.c11
1 files changed, 6 insertions, 5 deletions
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;