summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2018-08-09 06:14:01 -0400
committermidipix <writeonce@midipix.org>2018-08-09 06:14:01 -0400
commitc44aca813ce341a37492947f469a4eaedf570a9c (patch)
tree2fe91fdbba29c59d48b4bda09665549689dd205f /src
parent2672e2d2b68d3c66edd52293e1ab6cbe6b5f5b81 (diff)
downloadapimagic-c44aca813ce341a37492947f469a4eaedf570a9c.tar.bz2
apimagic-c44aca813ce341a37492947f469a4eaedf570a9c.tar.xz
front-end utility: amgc_main(): remove the redundant argc parameter.
Diffstat (limited to 'src')
-rw-r--r--src/apimagic.c2
-rw-r--r--src/driver/amgc_amain.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/apimagic.c b/src/apimagic.c
index 32e8e96..4204276 100644
--- a/src/apimagic.c
+++ b/src/apimagic.c
@@ -8,5 +8,5 @@
int main(int argc, char ** argv, char ** envp)
{
- return amgc_main(argc,argv,envp,0);
+ return amgc_main(argv,envp,0);
}
diff --git a/src/driver/amgc_amain.c b/src/driver/amgc_amain.c
index 9325a4f..cf4540d 100644
--- a/src/driver/amgc_amain.c
+++ b/src/driver/amgc_amain.c
@@ -64,7 +64,7 @@ static int amgc_exit(struct amgc_driver_ctx * dctx, int ret)
return ret;
}
-int amgc_main(int argc, char ** argv, char ** envp, const struct amgc_fd_ctx * fdctx)
+int amgc_main(char ** argv, char ** envp, const struct amgc_fd_ctx * fdctx)
{
int ret;
int fdout;
@@ -78,7 +78,7 @@ int amgc_main(int argc, char ** argv, char ** envp, const struct amgc_fd_ctx * f
if ((ret = amgc_get_driver_ctx(argv,envp,flags,fdctx,&dctx)))
return (ret == AMGC_USAGE)
- ? !--argc
+ ? !argv || !argv[0] || !argv[1]
: AMGC_ERROR;
if (dctx->cctx->drvflags & AMGC_DRIVER_VERSION)