diff options
Diffstat (limited to 'msg.c')
-rw-r--r-- | msg.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -22,7 +22,7 @@ | |||
22 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 22 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
23 | */ | 23 | */ |
24 | #include "includes.h" | 24 | #include "includes.h" |
25 | RCSID("$OpenBSD: msg.c,v 1.2 2002/06/19 00:27:55 deraadt Exp $"); | 25 | RCSID("$OpenBSD: msg.c,v 1.3 2002/06/24 15:49:22 itojun Exp $"); |
26 | 26 | ||
27 | #include "buffer.h" | 27 | #include "buffer.h" |
28 | #include "getput.h" | 28 | #include "getput.h" |
@@ -36,7 +36,7 @@ msg_send(int fd, u_char type, Buffer *m) | |||
36 | u_char buf[5]; | 36 | u_char buf[5]; |
37 | u_int mlen = buffer_len(m); | 37 | u_int mlen = buffer_len(m); |
38 | 38 | ||
39 | debug3("msg_send: type %d", type); | 39 | debug3("msg_send: type %u", (unsigned int)type & 0xff); |
40 | 40 | ||
41 | PUT_32BIT(buf, mlen + 1); | 41 | PUT_32BIT(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 */ |
@@ -59,7 +59,7 @@ msg_recv(int fd, Buffer *m) | |||
59 | if (res != sizeof(buf)) { | 59 | if (res != sizeof(buf)) { |
60 | if (res == 0) | 60 | if (res == 0) |
61 | return -1; | 61 | return -1; |
62 | fatal("msg_recv: read: header %d", res); | 62 | fatal("msg_recv: read: header %ld", (long)res); |
63 | } | 63 | } |
64 | msg_len = GET_32BIT(buf); | 64 | msg_len = GET_32BIT(buf); |
65 | if (msg_len > 256 * 1024) | 65 | if (msg_len > 256 * 1024) |