[lib] trivial: add const qualifier to stream_put/write

2008-06-07 Paul Jakma <paul@jakma.org>

	* stream.{c,h}: (stream_{put,write}) add const qualifier to source
	  argument. Change u_char to void *.
diff --git a/lib/ChangeLog b/lib/ChangeLog
index d8eb06e..681bdeb 100644
--- a/lib/ChangeLog
+++ b/lib/ChangeLog
@@ -1,3 +1,8 @@
+2008-06-07 Paul Jakma <paul@jakma.org>
+
+	* stream.{c,h}: (stream_{put,write}) add const qualifier to source
+	  argument. Change u_char to void *.
+
 2008-06-02 Denis Ovsienko
 
 	* workqueue.[ch]: completely drop WQ_AIM_HEAD flag and
diff --git a/lib/stream.c b/lib/stream.c
index 7034d90..983330f 100644
--- a/lib/stream.c
+++ b/lib/stream.c
@@ -458,7 +458,7 @@
  * stream_write() is saner
  */
 void
-stream_put (struct stream *s, void *src, size_t size)
+stream_put (struct stream *s, const void *src, size_t size)
 {
 
   /* XXX: CHECK_SIZE has strange semantics. It should be deprecated */
@@ -833,7 +833,7 @@
   
 /* Write data to buffer. */
 size_t
-stream_write (struct stream *s, u_char *ptr, size_t size)
+stream_write (struct stream *s, const void *ptr, size_t size)
 {
 
   CHECK_SIZE(s, size);
diff --git a/lib/stream.h b/lib/stream.h
index 715a083..3e4ba7b 100644
--- a/lib/stream.h
+++ b/lib/stream.h
@@ -150,7 +150,7 @@
 extern void stream_forward_endp (struct stream *, size_t);
 
 /* steam_put: NULL source zeroes out size_t bytes of stream */
-extern void stream_put (struct stream *, void *, size_t);
+extern void stream_put (struct stream *, const void *, size_t);
 extern int stream_putc (struct stream *, u_char);
 extern int stream_putc_at (struct stream *, size_t, u_char);
 extern int stream_putw (struct stream *, u_int16_t);
@@ -200,7 +200,7 @@
 extern ssize_t stream_recvfrom (struct stream *s, int fd, size_t len, 
                                 int flags, struct sockaddr *from, 
                                 socklen_t *fromlen);
-extern size_t stream_write (struct stream *, u_char *, size_t);
+extern size_t stream_write (struct stream *, const void *, size_t);
 
 /* reset the stream. See Note above */
 extern void stream_reset (struct stream *);