diff options
Diffstat (limited to 'compress.c')
-rw-r--r-- | compress.c | 12 |
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" |
17 | RCSID("$Id: compress.c,v 1.3 1999/11/25 00:54:59 damien Exp $"); | 17 | RCSID("$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: |