diff options
Diffstat (limited to 'buffer.c')
-rw-r--r-- | buffer.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: buffer.c,v 1.31 2006/08/03 03:34:41 deraadt Exp $ */ | 1 | /* $OpenBSD: buffer.c,v 1.32 2010/02/09 03:56:28 djm Exp $ */ |
2 | /* | 2 | /* |
3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> | 3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> |
4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland | 4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland |
@@ -160,7 +160,7 @@ buffer_check_alloc(Buffer *buffer, u_int len) | |||
160 | /* Returns the number of bytes of data in the buffer. */ | 160 | /* Returns the number of bytes of data in the buffer. */ |
161 | 161 | ||
162 | u_int | 162 | u_int |
163 | buffer_len(Buffer *buffer) | 163 | buffer_len(const Buffer *buffer) |
164 | { | 164 | { |
165 | return buffer->end - buffer->offset; | 165 | return buffer->end - buffer->offset; |
166 | } | 166 | } |
@@ -228,7 +228,7 @@ buffer_consume_end(Buffer *buffer, u_int bytes) | |||
228 | /* Returns a pointer to the first used byte in the buffer. */ | 228 | /* Returns a pointer to the first used byte in the buffer. */ |
229 | 229 | ||
230 | void * | 230 | void * |
231 | buffer_ptr(Buffer *buffer) | 231 | buffer_ptr(const Buffer *buffer) |
232 | { | 232 | { |
233 | return buffer->buf + buffer->offset; | 233 | return buffer->buf + buffer->offset; |
234 | } | 234 | } |
@@ -236,7 +236,7 @@ buffer_ptr(Buffer *buffer) | |||
236 | /* Dumps the contents of the buffer to stderr. */ | 236 | /* Dumps the contents of the buffer to stderr. */ |
237 | 237 | ||
238 | void | 238 | void |
239 | buffer_dump(Buffer *buffer) | 239 | buffer_dump(const Buffer *buffer) |
240 | { | 240 | { |
241 | u_int i; | 241 | u_int i; |
242 | u_char *ucp = buffer->buf; | 242 | u_char *ucp = buffer->buf; |