diff options
author | 2015-03-26 21:19:51 +0000 | |
---|---|---|
committer | 2015-03-26 21:19:51 +0000 | |
commit | 239b25b8bd1e45319af5a1657509ef6f9c90c30f (patch) | |
tree | 5634ce70f58598930fb1b5225886403240c43cef | |
parent | do not encourage random uppercasing; (diff) | |
download | wireguard-openbsd-239b25b8bd1e45319af5a1657509ef6f9c90c30f.tar.xz wireguard-openbsd-239b25b8bd1e45319af5a1657509ef6f9c90c30f.zip |
Fix error message in case of write failure.
ok djm
-rw-r--r-- | usr.bin/nc/socks.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/nc/socks.c b/usr.bin/nc/socks.c index f8adda463a2..1b06e0e12dd 100644 --- a/usr.bin/nc/socks.c +++ b/usr.bin/nc/socks.c @@ -1,4 +1,4 @@ -/* $OpenBSD: socks.c,v 1.20 2012/03/08 09:56:28 espie Exp $ */ +/* $OpenBSD: socks.c,v 1.21 2015/03/26 21:19:51 tobias Exp $ */ /* * Copyright (c) 1999 Niklas Hallqvist. All rights reserved. @@ -308,8 +308,8 @@ socks_connect(const char *host, const char *port, } /* Terminate headers */ - if ((r = atomicio(vwrite, proxyfd, "\r\n", 2)) != 2) - err(1, "write failed (2/%d)", r); + if ((cnt = atomicio(vwrite, proxyfd, "\r\n", 2)) != 2) + err(1, "write failed (%zu/2)", cnt); /* Read status reply */ proxy_read_line(proxyfd, buf, sizeof(buf)); |