summaryrefslogtreecommitdiff
path: root/scp.c
diff options
context:
space:
mode:
authormillert@openbsd.org <millert@openbsd.org>2020-05-29 21:22:02 +0000
committerDamien Miller <djm@mindrot.org>2020-05-30 10:48:06 +1000
commit5ad3c3a33ef038b55a14ebd31faeeec46073db2c (patch)
treeefcd2a685e4fb55796bef896b63689b21548685f /scp.c
parent712ac1efb687a945a89db6aa3e998c1a17b38653 (diff)
upstream: Fix error message on close(2) and add printf format
attributes. From Christos Zoulas, OK markus@ OpenBSD-Commit-ID: 41523c999a9e3561fcc7082fd38ea2e0629ee07e
Diffstat (limited to 'scp.c')
-rw-r--r--scp.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/scp.c b/scp.c
index b4492a062..6b1a0c8be 100644
--- a/scp.c
+++ b/scp.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: scp.c,v 1.210 2020/05/06 20:57:38 djm Exp $ */ 1/* $OpenBSD: scp.c,v 1.211 2020/05/29 21:22:02 millert Exp $ */
2/* 2/*
3 * scp - secure remote copy. This is basically patched BSD rcp which 3 * scp - secure remote copy. This is basically patched BSD rcp which
4 * uses ssh to do the data transfer (instead of using rcmd). 4 * uses ssh to do the data transfer (instead of using rcmd).
@@ -373,8 +373,11 @@ typedef struct {
373BUF *allocbuf(BUF *, int, int); 373BUF *allocbuf(BUF *, int, int);
374void lostconn(int); 374void lostconn(int);
375int okname(char *); 375int okname(char *);
376void run_err(const char *,...); 376void run_err(const char *,...)
377int note_err(const char *,...); 377 __attribute__((__format__ (printf, 1, 2)))
378 __attribute__((__nonnull__ (1)));
379int note_err(const char *,...)
380 __attribute__((__format__ (printf, 1, 2)));
378void verifydir(char *); 381void verifydir(char *);
379 382
380struct passwd *pwd; 383struct passwd *pwd;
@@ -1520,7 +1523,7 @@ bad: run_err("%s: %s", np, strerror(errno));
1520 } 1523 }
1521 } 1524 }
1522 if (close(ofd) == -1) 1525 if (close(ofd) == -1)
1523 note_err(np, "%s: close: %s", np, strerror(errno)); 1526 note_err("%s: close: %s", np, strerror(errno));
1524 (void) response(); 1527 (void) response();
1525 if (showprogress) 1528 if (showprogress)
1526 stop_progress_meter(); 1529 stop_progress_meter();