X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/putty/blobdiff_plain/1ef4dce9c5e794e746d141f72168ad0275b5b68d..d87d258a8f5d8fc9c43e73cc59ff4258b3755485:/psftp.c diff --git a/psftp.c b/psftp.c index fe01b1a9..179a1e90 100644 --- a/psftp.c +++ b/psftp.c @@ -16,6 +16,8 @@ #include "sftp.h" #include "int64.h" +const char *const appname = "PSFTP"; + /* * Since SFTP is a request-response oriented protocol, it requires * no buffer management: when we send data, we stop and wait for an @@ -2516,7 +2518,8 @@ int from_backend(void *frontend, int is_stderr, const char *data, int datalen) */ if (is_stderr) { if (len > 0) - fwrite(data, 1, len, stderr); + if (fwrite(data, 1, len, stderr) < len) + /* oh well */; return 0; } @@ -2839,7 +2842,6 @@ int psftp_main(int argc, char *argv[]) int mode = 0; int modeflags = 0; char *batchfile = NULL; - int errors = 0; flags = FLAG_STDERR | FLAG_INTERACTIVE #ifdef FLAG_SYNCAGENT @@ -2855,7 +2857,6 @@ int psftp_main(int argc, char *argv[]) do_defaults(NULL, &cfg); loaded_session = FALSE; - errors = 0; for (i = 1; i < argc; i++) { int ret; if (argv[i][0] != '-') {