summaryrefslogtreecommitdiff
path: root/buffer.c
diff options
context:
space:
mode:
Diffstat (limited to 'buffer.c')
-rw-r--r--buffer.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/buffer.c b/buffer.c
index e02e1e35c..ae9700344 100644
--- a/buffer.c
+++ b/buffer.c
@@ -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
162u_int 162u_int
163buffer_len(Buffer *buffer) 163buffer_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
230void * 230void *
231buffer_ptr(Buffer *buffer) 231buffer_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
238void 238void
239buffer_dump(Buffer *buffer) 239buffer_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;