summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2024-01-01 13:59:41 +0000
committermidipix <writeonce@midipix.org>2024-01-22 03:49:50 +0000
commit62634282d8511970f0ccdcc41249e7a947134a42 (patch)
tree8cd4b9125a99926f12d28a93951e8a8c1b324386
parent1c4305336c55db9aef94971b7338f1446ecf9806 (diff)
downloadslibtool-62634282d8511970f0ccdcc41249e7a947134a42.tar.bz2
slibtool-62634282d8511970f0ccdcc41249e7a947134a42.tar.xz
slbt_get_driver_ctx(): properly pass through SLBT_USAGE as return value.
-rw-r--r--src/driver/slbt_driver_ctx.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/driver/slbt_driver_ctx.c b/src/driver/slbt_driver_ctx.c
index 652626b..cd89a00 100644
--- a/src/driver/slbt_driver_ctx.c
+++ b/src/driver/slbt_driver_ctx.c
@@ -1444,8 +1444,16 @@ int slbt_get_driver_ctx(
sargv.cargv = 0;
objlistv = 0;
- if (slbt_split_argv(argv,flags,&sargv,&objlistv,fdctx->fderr,fdctx->fdcwd))
- return slbt_free_argv_buffer(&sargv,objlistv);
+ switch (slbt_split_argv(argv,flags,&sargv,&objlistv,fdctx->fderr,fdctx->fdcwd)) {
+ case SLBT_OK:
+ break;
+
+ case SLBT_USAGE:
+ return SLBT_USAGE;
+
+ default:
+ return slbt_free_argv_buffer(&sargv,objlistv);
+ }
if (!(meta = argv_get(
sargv.targv,optv,