summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorDamien Miller <djm@cvs.openbsd.org>2010-02-09 03:56:29 +0000
committerDamien Miller <djm@cvs.openbsd.org>2010-02-09 03:56:29 +0000
commit6a44f2efd7b682c2792d7416458f4dd0d4505bfb (patch)
treeefb11c5f70dbb02061c3457d5e650392d65adde0 /usr.bin
parent0896dcc9f724918cc7181407d205fc6d6d3cb89b (diff)
constify the arguments to buffer_len, buffer_ptr and buffer_dump
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/ssh/buffer.c8
-rw-r--r--usr.bin/ssh/buffer.h8
2 files changed, 8 insertions, 8 deletions
diff --git a/usr.bin/ssh/buffer.c b/usr.bin/ssh/buffer.c
index 8527c04839d..656454bf84e 100644
--- a/usr.bin/ssh/buffer.c
+++ b/usr.bin/ssh/buffer.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: buffer.c,v 1.31 2006/08/03 03:34:41 deraadt Exp $ */
+/* $OpenBSD: buffer.c,v 1.32 2010/02/09 03:56:28 djm Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -158,7 +158,7 @@ buffer_check_alloc(Buffer *buffer, u_int len)
/* Returns the number of bytes of data in the buffer. */
u_int
-buffer_len(Buffer *buffer)
+buffer_len(const Buffer *buffer)
{
return buffer->end - buffer->offset;
}
@@ -226,7 +226,7 @@ buffer_consume_end(Buffer *buffer, u_int bytes)
/* Returns a pointer to the first used byte in the buffer. */
void *
-buffer_ptr(Buffer *buffer)
+buffer_ptr(const Buffer *buffer)
{
return buffer->buf + buffer->offset;
}
@@ -234,7 +234,7 @@ buffer_ptr(Buffer *buffer)
/* Dumps the contents of the buffer to stderr. */
void
-buffer_dump(Buffer *buffer)
+buffer_dump(const Buffer *buffer)
{
u_int i;
u_char *ucp = buffer->buf;
diff --git a/usr.bin/ssh/buffer.h b/usr.bin/ssh/buffer.h
index ecad28973f8..4ef4f80b35a 100644
--- a/usr.bin/ssh/buffer.h
+++ b/usr.bin/ssh/buffer.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: buffer.h,v 1.18 2010/01/12 01:36:08 djm Exp $ */
+/* $OpenBSD: buffer.h,v 1.19 2010/02/09 03:56:28 djm Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -27,8 +27,8 @@ void buffer_init(Buffer *);
void buffer_clear(Buffer *);
void buffer_free(Buffer *);
-u_int buffer_len(Buffer *);
-void *buffer_ptr(Buffer *);
+u_int buffer_len(const Buffer *);
+void *buffer_ptr(const Buffer *);
void buffer_append(Buffer *, const void *, u_int);
void *buffer_append_space(Buffer *, u_int);
@@ -40,7 +40,7 @@ void buffer_get(Buffer *, void *, u_int);
void buffer_consume(Buffer *, u_int);
void buffer_consume_end(Buffer *, u_int);
-void buffer_dump(Buffer *);
+void buffer_dump(const Buffer *);
int buffer_get_ret(Buffer *, void *, u_int);
int buffer_consume_ret(Buffer *, u_int);