summaryrefslogtreecommitdiff
path: root/compress.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2000-03-17 23:40:15 +1100
committerDamien Miller <djm@mindrot.org>2000-03-17 23:40:15 +1100
commit7684ee17ee96426970c00cb44d9d00b6611b9a57 (patch)
treecb447b6e9d3fdc10b3e66a90b198092d7245447a /compress.c
parentd6121d2972c1a6924f6d186ea04eefe9dab774ef (diff)
- OpenBSD CVS updates:
- [atomicio.c auth-krb4.c bufaux.c channels.c compress.c fingerprint.c] [packet.h radix.c rsa.c scp.c ssh-agent.c ssh-keygen.c sshconnect.c] [sshd.c] pedantic: signed vs. unsigned, void*-arithm, etc - [ssh.1 sshd.8] Various cleanups and standardizations.
Diffstat (limited to 'compress.c')
-rw-r--r--compress.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/compress.c b/compress.c
index 544811c19..cf15c6670 100644
--- a/compress.c
+++ b/compress.c
@@ -14,7 +14,7 @@
14 */ 14 */
15 15
16#include "includes.h" 16#include "includes.h"
17RCSID("$Id: compress.c,v 1.3 1999/11/25 00:54:59 damien Exp $"); 17RCSID("$Id: compress.c,v 1.4 2000/03/17 12:40:16 damien Exp $");
18 18
19#include "ssh.h" 19#include "ssh.h"
20#include "buffer.h" 20#include "buffer.h"
@@ -75,13 +75,13 @@ buffer_compress(Buffer * input_buffer, Buffer * output_buffer)
75 return; 75 return;
76 76
77 /* Input is the contents of the input buffer. */ 77 /* Input is the contents of the input buffer. */
78 outgoing_stream.next_in = buffer_ptr(input_buffer); 78 outgoing_stream.next_in = (unsigned char *) buffer_ptr(input_buffer);
79 outgoing_stream.avail_in = buffer_len(input_buffer); 79 outgoing_stream.avail_in = buffer_len(input_buffer);
80 80
81 /* Loop compressing until deflate() returns with avail_out != 0. */ 81 /* Loop compressing until deflate() returns with avail_out != 0. */
82 do { 82 do {
83 /* Set up fixed-size output buffer. */ 83 /* Set up fixed-size output buffer. */
84 outgoing_stream.next_out = buf; 84 outgoing_stream.next_out = (unsigned char *)buf;
85 outgoing_stream.avail_out = sizeof(buf); 85 outgoing_stream.avail_out = sizeof(buf);
86 86
87 /* Compress as much data into the buffer as possible. */ 87 /* Compress as much data into the buffer as possible. */
@@ -124,10 +124,10 @@ buffer_uncompress(Buffer * input_buffer, Buffer * output_buffer)
124 char buf[4096]; 124 char buf[4096];
125 int status; 125 int status;
126 126
127 incoming_stream.next_in = buffer_ptr(input_buffer); 127 incoming_stream.next_in = (unsigned char *) buffer_ptr(input_buffer);
128 incoming_stream.avail_in = buffer_len(input_buffer); 128 incoming_stream.avail_in = buffer_len(input_buffer);
129 129
130 incoming_stream.next_out = buf; 130 incoming_stream.next_out = (unsigned char *) buf;
131 incoming_stream.avail_out = sizeof(buf); 131 incoming_stream.avail_out = sizeof(buf);
132 132
133 for (;;) { 133 for (;;) {
@@ -136,7 +136,7 @@ buffer_uncompress(Buffer * input_buffer, Buffer * output_buffer)
136 case Z_OK: 136 case Z_OK:
137 buffer_append(output_buffer, buf, 137 buffer_append(output_buffer, buf,
138 sizeof(buf) - incoming_stream.avail_out); 138 sizeof(buf) - incoming_stream.avail_out);
139 incoming_stream.next_out = buf; 139 incoming_stream.next_out = (unsigned char *) buf;
140 incoming_stream.avail_out = sizeof(buf); 140 incoming_stream.avail_out = sizeof(buf);
141 break; 141 break;
142 case Z_STREAM_END: 142 case Z_STREAM_END: