1
0
mirror of https://github.com/winfsp/sshfs-win.git synced 2025-04-18 23:04:01 +03:00

Remove default ssh port

reformat code style
This commit is contained in:
LeadroyaL 2023-03-14 21:02:11 +08:00 committed by GitHub
parent 3669836617
commit ace9c17561
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -321,9 +321,12 @@ static int do_svc(int argc, char *argv[])
sshfs, SSHFS_ARGS, idmap, authmeth, volpfx, portopt, remote, argv[2], 0,
};
if (strlen(portopt) == 0)
if ('\0' == portopt[0])
{
int portopt_idx = 10;
/* if not passing a port option, remove it from sshfs_argv */
int portopt_idx = 0;
while (sshfs_argv[portopt_idx] != portopt)
portopt_idx++;
while (sshfs_argv[portopt_idx] != 0)
{
sshfs_argv[portopt_idx] = sshfs_argv[portopt_idx + 1];