if (psftp_connect(userhost, user, portnumber))
int ret; ret = psftp_connect(userhost, user, portnumber); sfree(userhost); if (ret)
int psftp_main(int argc, char *argv[]){    int i;    int portnumber = 0;    char *userhost, *user;    int mode = 0;    int modeflags = 0;    char *batchfile = NULL;    int errors = 0;    flags = FLAG_STDERR | FLAG_INTERACTIVE#ifdef FLAG_SYNCAGENT	| FLAG_SYNCAGENT#endif	;    cmdline_tooltype = TOOLTYPE_FILETRANSFER;    ssh_get_line = &console_get_line;    sk_init();    userhost = user = NULL;    errors = 0;    for (i = 1; i < argc; i++) {	int ret;	if (argv[i][0] != '-') {            if (userhost)                usage();            else                userhost = dupstr(argv[i]);	    continue;	}	ret = cmdline_process_param(argv[i], i+1<argc?argv[i+1]:NULL, 1, &cfg);	if (ret == -2) {	    cmdline_error("option \"%s\" requires an argument", argv[i]);	} else if (ret == 2) {	    i++;	       /* skip next argument */	} else if (ret == 1) {	    /* We have our own verbosity in addition to `flags'. */	    if (flags & FLAG_VERBOSE)		verbose = 1;	} else if (strcmp(argv[i], "-h") == 0 ||		   strcmp(argv[i], "-?") == 0) {	    usage();	} else if (strcmp(argv[i], "-batch") == 0) {	    console_batch_mode = 1;	} else if (strcmp(argv[i], "-b") == 0 && i + 1 < argc) {	    mode = 1;	    batchfile = argv[++i];	} else if (strcmp(argv[i], "-bc") == 0) {	    modeflags = modeflags | 1;	} else if (strcmp(argv[i], "-be") == 0) {	    modeflags = modeflags | 2;	} else if (strcmp(argv[i], "--") == 0) {	    i++;	    break;	} else {	    cmdline_error("unknown option \"%s\"", argv[i]);	}    }    argc -= i;    argv += i;    back = NULL;    /*     * If a user@host string has already been provided, connect to     * it now.     */    if (userhost) {	if (psftp_connect(userhost, user, portnumber))	    return 1;	if (do_sftp_init())	    return 1;    } else {	printf("psftp: no hostname specified; use \"open host.name\""	    " to connect\n");    }    do_sftp(mode, modeflags, batchfile);    if (back != NULL && back->socket(backhandle) != NULL) {	char ch;	back->special(backhandle, TS_EOF);	sftp_recvdata(&ch, 1);    }    random_save_seed();    return 0;}