summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2020-05-29 21:22:03 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2020-05-29 21:22:03 +0000
commitc44ba1d421321ad68ecb0fe6bbfd75684cc5f6bd (patch)
treef2293a0b9ac16a54744ad51ac2b7c8f6341ba1f7 /usr.bin
parent36919bcb6f574ec66b4b5e79e653201fce28c0ba (diff)
Fix error message on close(2) and add printf format attributes.
From Christos Zoulas, OK markus@
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/ssh/scp.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/usr.bin/ssh/scp.c b/usr.bin/ssh/scp.c
index 9fcbf9c3955..d0bf05c5543 100644
--- a/usr.bin/ssh/scp.c
+++ b/usr.bin/ssh/scp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: scp.c,v 1.210 2020/05/06 20:57:38 djm Exp $ */
+/* $OpenBSD: scp.c,v 1.211 2020/05/29 21:22:02 millert Exp $ */
/*
* scp - secure remote copy. This is basically patched BSD rcp which
* uses ssh to do the data transfer (instead of using rcmd).
@@ -353,8 +353,11 @@ typedef struct {
BUF *allocbuf(BUF *, int, int);
void lostconn(int);
int okname(char *);
-void run_err(const char *,...);
-int note_err(const char *,...);
+void run_err(const char *,...)
+ __attribute__((__format__ (printf, 1, 2)))
+ __attribute__((__nonnull__ (1)));
+int note_err(const char *,...)
+ __attribute__((__format__ (printf, 1, 2)));
void verifydir(char *);
struct passwd *pwd;
@@ -1485,7 +1488,7 @@ bad: run_err("%s: %s", np, strerror(errno));
}
}
if (close(ofd) == -1)
- note_err(np, "%s: close: %s", np, strerror(errno));
+ note_err("%s: close: %s", np, strerror(errno));
(void) response();
if (showprogress)
stop_progress_meter();