diff options
| author | 2006-03-30 09:58:15 +0000 | |
|---|---|---|
| committer | 2006-03-30 09:58:15 +0000 | |
| commit | 4fad3025d21ab2407507d77a8924b309b7a88ffb (patch) | |
| tree | ad3ae65d2853f74a0a40adf9210aa4eca4369df3 /usr.bin/ssh/msg.c | |
| parent | Minor cleanup and start using rmx_refcnt to show the refcount instead of 0. (diff) | |
| download | wireguard-openbsd-4fad3025d21ab2407507d77a8924b309b7a88ffb.tar.xz wireguard-openbsd-4fad3025d21ab2407507d77a8924b309b7a88ffb.zip | |
replace {GET,PUT}_XXBIT macros with functionally similar functions,
silencing a heap of lint warnings. also allows them to use
__bounded__ checking which can't be applied to macros; requested
by and feedback from deraadt@
Diffstat (limited to 'usr.bin/ssh/msg.c')
| -rw-r--r-- | usr.bin/ssh/msg.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/ssh/msg.c b/usr.bin/ssh/msg.c index 2c0a6726946..fb08df54872 100644 --- a/usr.bin/ssh/msg.c +++ b/usr.bin/ssh/msg.c @@ -1,4 +1,4 @@ -/* $OpenBSD: msg.c,v 1.10 2006/03/25 13:17:02 djm Exp $ */ +/* $OpenBSD: msg.c,v 1.11 2006/03/30 09:58:15 djm Exp $ */ /* * Copyright (c) 2002 Markus Friedl. All rights reserved. * @@ -25,10 +25,10 @@ #include "includes.h" #include "buffer.h" -#include "getput.h" #include "log.h" #include "atomicio.h" #include "msg.h" +#include "misc.h" int ssh_msg_send(int fd, u_char type, Buffer *m) @@ -38,7 +38,7 @@ ssh_msg_send(int fd, u_char type, Buffer *m) debug3("ssh_msg_send: type %u", (unsigned int)type & 0xff); - PUT_32BIT(buf, mlen + 1); + put_u32(buf, mlen + 1); buf[4] = type; /* 1st byte of payload is mesg-type */ if (atomicio(vwrite, fd, buf, sizeof(buf)) != sizeof(buf)) { error("ssh_msg_send: write"); @@ -64,7 +64,7 @@ ssh_msg_recv(int fd, Buffer *m) error("ssh_msg_recv: read: header"); return (-1); } - msg_len = GET_32BIT(buf); + msg_len = get_u32(buf); if (msg_len > 256 * 1024) { error("ssh_msg_recv: read: bad msg_len %u", msg_len); return (-1); |
