summaryrefslogtreecommitdiff
path: root/msg.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2006-03-31 23:13:02 +1100
committerDamien Miller <djm@mindrot.org>2006-03-31 23:13:02 +1100
commit3f9418893e1254bda3b87e7d3af7029d11b0a6c7 (patch)
tree97662277f300ea1ab8255905b9d5d72a26f7578f /msg.c
parentd79b424e8ad424a44119f327e5ab1f79cd35649c (diff)
- djm@cvs.openbsd.org 2006/03/30 09:58:16
[authfd.c bufaux.c deattack.c gss-serv.c mac.c misc.c misc.h] [monitor_wrap.c msg.c packet.c sftp-client.c sftp-server.c ssh-agent.c] 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 'msg.c')
-rw-r--r--msg.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/msg.c b/msg.c
index 2c0a67269..fb08df548 100644
--- a/msg.c
+++ b/msg.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: msg.c,v 1.10 2006/03/25 13:17:02 djm Exp $ */ 1/* $OpenBSD: msg.c,v 1.11 2006/03/30 09:58:15 djm Exp $ */
2/* 2/*
3 * Copyright (c) 2002 Markus Friedl. All rights reserved. 3 * Copyright (c) 2002 Markus Friedl. All rights reserved.
4 * 4 *
@@ -25,10 +25,10 @@
25#include "includes.h" 25#include "includes.h"
26 26
27#include "buffer.h" 27#include "buffer.h"
28#include "getput.h"
29#include "log.h" 28#include "log.h"
30#include "atomicio.h" 29#include "atomicio.h"
31#include "msg.h" 30#include "msg.h"
31#include "misc.h"
32 32
33int 33int
34ssh_msg_send(int fd, u_char type, Buffer *m) 34ssh_msg_send(int fd, u_char type, Buffer *m)
@@ -38,7 +38,7 @@ ssh_msg_send(int fd, u_char type, Buffer *m)
38 38
39 debug3("ssh_msg_send: type %u", (unsigned int)type & 0xff); 39 debug3("ssh_msg_send: type %u", (unsigned int)type & 0xff);
40 40
41 PUT_32BIT(buf, mlen + 1); 41 put_u32(buf, mlen + 1);
42 buf[4] = type; /* 1st byte of payload is mesg-type */ 42 buf[4] = type; /* 1st byte of payload is mesg-type */
43 if (atomicio(vwrite, fd, buf, sizeof(buf)) != sizeof(buf)) { 43 if (atomicio(vwrite, fd, buf, sizeof(buf)) != sizeof(buf)) {
44 error("ssh_msg_send: write"); 44 error("ssh_msg_send: write");
@@ -64,7 +64,7 @@ ssh_msg_recv(int fd, Buffer *m)
64 error("ssh_msg_recv: read: header"); 64 error("ssh_msg_recv: read: header");
65 return (-1); 65 return (-1);
66 } 66 }
67 msg_len = GET_32BIT(buf); 67 msg_len = get_u32(buf);
68 if (msg_len > 256 * 1024) { 68 if (msg_len > 256 * 1024) {
69 error("ssh_msg_recv: read: bad msg_len %u", msg_len); 69 error("ssh_msg_recv: read: bad msg_len %u", msg_len);
70 return (-1); 70 return (-1);