Mercurial > dropbear
comparison scp.c @ 1823:401d7d8c8a79
Remove unused argument of do_cmd() in scp.c (#125)
author | Anton Bershanskiy <45960703+bershanskiy@users.noreply.github.com> |
---|---|
date | Thu, 19 Aug 2021 18:40:58 +0300 |
parents | 3080aed32bf1 |
children |
comparison
equal
deleted
inserted
replaced
1822:fa6ff07dcc77 | 1823:401d7d8c8a79 |
---|---|
183 addargs(&args, "%s", host); | 183 addargs(&args, "%s", host); |
184 addargs(&args, "%s", cmd); | 184 addargs(&args, "%s", cmd); |
185 } | 185 } |
186 | 186 |
187 int | 187 int |
188 do_cmd(char *host, char *remuser, char *cmd, int *fdin, int *fdout, int argc) | 188 do_cmd(char *host, char *remuser, char *cmd, int *fdin, int *fdout) |
189 { | 189 { |
190 int pin[2], pout[2], reserved[2]; | 190 int pin[2], pout[2], reserved[2]; |
191 | 191 |
192 if (verbose_mode) | 192 if (verbose_mode) |
193 fprintf(stderr, | 193 fprintf(stderr, |
530 if (remin == -1) { | 530 if (remin == -1) { |
531 len = strlen(targ) + CMDNEEDS + 20; | 531 len = strlen(targ) + CMDNEEDS + 20; |
532 bp = xmalloc(len); | 532 bp = xmalloc(len); |
533 (void) snprintf(bp, len, "%s -t %s", cmd, targ); | 533 (void) snprintf(bp, len, "%s -t %s", cmd, targ); |
534 host = cleanhostname(thost); | 534 host = cleanhostname(thost); |
535 if (do_cmd(host, tuser, bp, &remin, | 535 if (do_cmd(host, tuser, bp, &remin, &remout) < 0) |
536 &remout, argc) < 0) | |
537 exit(1); | 536 exit(1); |
538 if (response() < 0) | 537 if (response() < 0) |
539 exit(1); | 538 exit(1); |
540 (void) xfree(bp); | 539 (void) xfree(bp); |
541 } | 540 } |
582 } | 581 } |
583 host = cleanhostname(host); | 582 host = cleanhostname(host); |
584 len = strlen(src) + CMDNEEDS + 20; | 583 len = strlen(src) + CMDNEEDS + 20; |
585 bp = xmalloc(len); | 584 bp = xmalloc(len); |
586 (void) snprintf(bp, len, "%s -f %s", cmd, src); | 585 (void) snprintf(bp, len, "%s -f %s", cmd, src); |
587 if (do_cmd(host, suser, bp, &remin, &remout, argc) < 0) { | 586 if (do_cmd(host, suser, bp, &remin, &remout) < 0) { |
588 (void) xfree(bp); | 587 (void) xfree(bp); |
589 ++errs; | 588 ++errs; |
590 continue; | 589 continue; |
591 } | 590 } |
592 xfree(bp); | 591 xfree(bp); |