summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorAnil Madhavapeddy <avsm@cvs.openbsd.org>2004-04-06 09:34:43 +0000
committerAnil Madhavapeddy <avsm@cvs.openbsd.org>2004-04-06 09:34:43 +0000
commitf163c30ca0601aab1d1da0129261ccee20ab9bdc (patch)
tree62487384d23a48fa3a00633f28eb4a6deb0c3701 /usr.sbin
parentd8db570e0e0de88680f3afd04ed9ee34a7b12f31 (diff)
dont write more than 4 bytes even on 64-bit. beck@ ok
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/afs/src/arlad/kernel.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/afs/src/arlad/kernel.c b/usr.sbin/afs/src/arlad/kernel.c
index d300263147a..14c94757302 100644
--- a/usr.sbin/afs/src/arlad/kernel.c
+++ b/usr.sbin/afs/src/arlad/kernel.c
@@ -211,8 +211,8 @@ tcp_write (int fd, const void *data, size_t len)
int32_t slen = htonl(len);
char out_len[4];
- memcpy (out_len, &slen, sizeof(len));
- if (send (fd, out_len, sizeof(len), 0) != sizeof(out_len)) {
+ memcpy (out_len, &slen, sizeof(slen));
+ if (send (fd, out_len, sizeof(slen), 0) != sizeof(out_len)) {
arla_warn (ADEBWARN, errno, "tcp_write: failed to write length");
return -1;
}