diff options
author | midipix <writeonce@midipix.org> | 2018-08-09 05:47:53 -0400 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2018-08-09 05:47:53 -0400 |
commit | 598944c893f8eec1680890353ae32f9d52bc4ffd (patch) | |
tree | bcb418b61e5d2b5ce8753888d4c0dece2d7d7868 /src/driver | |
parent | e3d183ade43803d9eb8174bbabd3ca4f384e443a (diff) | |
download | ptycon-598944c893f8eec1680890353ae32f9d52bc4ffd.tar.bz2 ptycon-598944c893f8eec1680890353ae32f9d52bc4ffd.tar.xz |
front-end utility: ptyc_main(): remove the redundant argc parameter.
Diffstat (limited to 'src/driver')
-rw-r--r-- | src/driver/ptyc_amain.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/driver/ptyc_amain.c b/src/driver/ptyc_amain.c index 1021048..37c2657 100644 --- a/src/driver/ptyc_amain.c +++ b/src/driver/ptyc_amain.c @@ -56,7 +56,7 @@ static int ptyc_exit(struct ptyc_driver_ctx * dctx, int nerrors) return nerrors ? 2 : 0; } -int ptyc_main(int argc, char ** argv, char ** envp) +int ptyc_main(char ** argv, char ** envp) { int ret; struct ptyc_driver_ctx * dctx; @@ -65,7 +65,9 @@ int ptyc_main(int argc, char ** argv, char ** envp) return ret; if ((ret = ptyc_get_driver_ctx(argv,envp,PTYC_DRIVER_FLAGS,&dctx))) - return (ret == PTYC_USAGE) ? !--argc : 2; + return (ret == PTYC_USAGE) + ? !argv || !argv[0] || !argv[1] + : 2; if (dctx->cctx->drvflags & PTYC_DRIVER_VERSION) if ((ptyc_version(dctx)) < 0) |