فهرست منبع

tsend: s/char*/const char*/ in function params.

Andrei Pelinescu-Onciul 15 سال پیش
والد
کامیت
cf80528aab
2فایلهای تغییر یافته به همراه4 افزوده شده و 4 حذف شده
  1. 2 2
      tsend.c
  2. 2 2
      tsend.h

+ 2 - 2
tsend.c

@@ -120,7 +120,7 @@ poll_loop: \
  *  (if less than len => couldn't send all)
  *  bugs: signals will reset the timer
  */
-int tsend_stream(int fd, char* buf, unsigned int len, int timeout)
+int tsend_stream(int fd, const char* buf, unsigned int len, int timeout)
 {
 	int written;
 	TSEND_INIT;
@@ -157,7 +157,7 @@ error:
  *  (if less than len => couldn't send all)
  *  bugs: signals will reset the timer
  */
-int tsend_dgram(int fd, char* buf, unsigned int len, 
+int tsend_dgram(int fd, const char* buf, unsigned int len, 
 				const struct sockaddr* to, socklen_t tolen, int timeout)
 {
 	TSEND_INIT;

+ 2 - 2
tsend.h

@@ -34,8 +34,8 @@
 #define __tsend_h
 
 
-int tsend_stream(int fd, char* buf, unsigned int len, int timeout);
-int tsend_dgram(int fd, char* buf, unsigned int len, 
+int tsend_stream(int fd, const char* buf, unsigned int len, int timeout);
+int tsend_dgram(int fd, const char* buf, unsigned int len, 
 				const struct sockaddr* to, socklen_t tolen, int timeout);
 int tsend_dgram_ev(int fd, const struct iovec* v, int count, int timeout);