From caf185d4aabe9fbd612d62c25a5eb03dea2c92db Mon Sep 17 00:00:00 2001 From: Fritz Elfert Date: Tue, 29 Jun 1999 02:55:19 +0000 Subject: cmdline args --- plpftp/ftp.cc | 2 +- plpftp/main.cc | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/plpftp/ftp.cc b/plpftp/ftp.cc index 3c915e3..16a3bc2 100644 --- a/plpftp/ftp.cc +++ b/plpftp/ftp.cc @@ -99,7 +99,7 @@ session(rfsv32 & a, int xargc, char **xargv) long res; int once = 0; - if (xargc > 0) { + if (xargc > 1) { once = 1; argc = (xargc<10)?xargc:10; for (int i = 0; i < argc; i++) diff --git a/plpftp/main.cc b/plpftp/main.cc index fbb5976..e4e0875 100644 --- a/plpftp/main.cc +++ b/plpftp/main.cc @@ -60,13 +60,15 @@ main(int argc, char **argv) // Command line parameter processing int sockNum = DPORT; - if (!strcmp(argv[1], "-s") && (argc > 2)) { + if ((argc > 2) && !strcmp(argv[1], "-s")) { sockNum = atoi(argv[2]); argc -= 2; - for (int i=1; i < argc; i++) + for (int i=1; istartup(); res = skt->connect(NULL, sockNum); -- cgit v1.2.3