summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/driver/pe_amain.c4
-rw-r--r--src/perk.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/driver/pe_amain.c b/src/driver/pe_amain.c
index 585d50a..50d18ac 100644
--- a/src/driver/pe_amain.c
+++ b/src/driver/pe_amain.c
@@ -83,7 +83,7 @@ static int pe_exit(struct pe_driver_ctx * dctx, int ret)
return ret;
}
-int pe_main(int argc, char ** argv, char ** envp, const struct pe_fd_ctx * fdctx)
+int pe_main(char ** argv, char ** envp, const struct pe_fd_ctx * fdctx)
{
int ret;
int fdout;
@@ -97,7 +97,7 @@ int pe_main(int argc, char ** argv, char ** envp, const struct pe_fd_ctx * fdctx
if ((ret = pe_get_driver_ctx(argv,envp,flags,fdctx,&dctx)))
return (ret == PERK_USAGE)
- ? !--argc
+ ? !argv || !argv[0] || !argv[1]
: PERK_ERROR;
if (dctx->cctx->drvflags & PERK_DRIVER_VERSION)
diff --git a/src/perk.c b/src/perk.c
index 96e5c81..0bd6cee 100644
--- a/src/perk.c
+++ b/src/perk.c
@@ -8,5 +8,5 @@
int main(int argc, char ** argv, char ** envp)
{
- return pe_main(argc,argv,envp,0);
+ return pe_main(argv,envp,0);
}