summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2004-09-15 18:44:45 +0000
committerderaadt <deraadt@openbsd.org>2004-09-15 18:44:45 +0000
commit9aeab6494dff4f83fc2ba0461227b280da4651ba (patch)
treef34b51325cb0474146783556a04b8e7c4ba86002
parentremove unused variable (diff)
downloadwireguard-openbsd-9aeab6494dff4f83fc2ba0461227b280da4651ba.tar.xz
wireguard-openbsd-9aeab6494dff4f83fc2ba0461227b280da4651ba.zip
remove return error variables.. set but never used
-rw-r--r--usr.bin/nc/netcat.c26
1 files changed, 11 insertions, 15 deletions
diff --git a/usr.bin/nc/netcat.c b/usr.bin/nc/netcat.c
index ea907d6b1ad..a2cb168e32c 100644
--- a/usr.bin/nc/netcat.c
+++ b/usr.bin/nc/netcat.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: netcat.c,v 1.73 2004/07/15 15:07:52 markus Exp $ */
+/* $OpenBSD: netcat.c,v 1.74 2004/09/15 18:44:45 deraadt Exp $ */
/*
* Copyright (c) 2001 Eric Jackson <ericj@monkey.org>
*
@@ -583,8 +583,8 @@ void
readwrite(int nfd)
{
struct pollfd pfd[2];
- char buf[BUFSIZ];
- int wfd = fileno(stdin), n, ret;
+ unsigned char buf[BUFSIZ];
+ int wfd = fileno(stdin), n;
int lfd = fileno(stdout);
/* Setup Network FD */
@@ -617,9 +617,8 @@ readwrite(int nfd)
} else {
if (tflag)
atelnet(nfd, buf, n);
- if ((ret = atomicio(
- (ssize_t (*)(int, void *, size_t))write,
- lfd, buf, n)) != n)
+ if (atomicio((ssize_t (*)(int, void *, size_t))write,
+ lfd, buf, n) != n)
return;
}
}
@@ -632,9 +631,8 @@ readwrite(int nfd)
pfd[1].fd = -1;
pfd[1].events = 0;
} else {
- if ((ret = atomicio(
- (ssize_t (*)(int, void *, size_t))write,
- nfd, buf, n)) != n)
+ if (atomicio((ssize_t (*)(int, void *, size_t))write,
+ nfd, buf, n) != n)
return;
}
}
@@ -645,7 +643,6 @@ readwrite(int nfd)
void
atelnet(int nfd, unsigned char *buf, unsigned int size)
{
- int ret;
unsigned char *p, *end;
unsigned char obuf[4];
@@ -666,9 +663,8 @@ atelnet(int nfd, unsigned char *buf, unsigned int size)
p++;
obuf[2] = *p;
obuf[3] = '\0';
- if ((ret = atomicio(
- (ssize_t (*)(int, void *, size_t))write,
- nfd, obuf, 3)) != 3)
+ if (atomicio((ssize_t (*)(int, void *, size_t))write,
+ nfd, obuf, 3) != 3)
warnx("Write Error!");
obuf[0] = '\0';
}
@@ -749,10 +745,10 @@ build_ports(char *p)
int
udptest(int s)
{
- int i, rv, ret;
+ int i, ret;
for (i = 0; i <= 3; i++) {
- if ((rv = write(s, "X", 1)) == 1)
+ if (write(s, "X", 1) == 1)
ret = 1;
else
ret = -1;