From: adrian <> Date: Wed, 23 Oct 2002 15:17:34 +0000 (+0000) Subject: comm_write() should operate on a const char *buf, not a char *buf X-Git-Tag: SQUID_3_0_PRE1~578 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dba1a67de9256f3d40929d15e500516622478d20;p=thirdparty%2Fsquid.git comm_write() should operate on a const char *buf, not a char *buf --- diff --git a/src/comm.cc b/src/comm.cc index 5d9922f078..0ce58c179b 100644 --- a/src/comm.cc +++ b/src/comm.cc @@ -1,6 +1,6 @@ /* - * $Id: comm.cc,v 1.348 2002/10/21 15:13:23 adrian Exp $ + * $Id: comm.cc,v 1.349 2002/10/23 09:17:34 adrian Exp $ * * DEBUG: section 5 Socket Functions * AUTHOR: Harvest Derived @@ -87,7 +87,7 @@ struct _fdc_t { void *handler_data; } read; struct { - char *buf; + const char *buf; int size; int curofs; IOCB *handler; @@ -665,7 +665,7 @@ comm_write_try(int fd, void *data) * completes, on error, or on file descriptor close. */ void -comm_write(int fd, char *buf, size_t size, IOWCB *handler, void *handler_data) +comm_write(int fd, const char *buf, size_t size, IOWCB *handler, void *handler_data) { /* Make sure we're not writing anything and we're not closing */ assert(fdc_table[fd].active == 1); diff --git a/src/comm.h b/src/comm.h index c8204dad37..10caea20c4 100644 --- a/src/comm.h +++ b/src/comm.h @@ -17,6 +17,6 @@ extern int comm_udp_recvfrom(int fd, void *buf, size_t len, int flags, extern int comm_udp_recv(int fd, void *buf, size_t len, int flags); extern ssize_t comm_udp_send(int s, const void *buf, size_t len, int flags); -extern void comm_write(int s, char *buf, size_t len, IOWCB *callback, void *callback_data); +extern void comm_write(int s, const char *buf, size_t len, IOWCB *callback, void *callback_data); #endif