[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnurl] 38/116: memdebug: use send/recv signature for curl_
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnurl] 38/116: memdebug: use send/recv signature for curl_dosend/curl_dorecv |
Date: |
Tue, 05 Dec 2017 14:51:08 +0100 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to branch master
in repository gnurl.
commit 52d9a11c1c166d248fa09e834cf0171eb07cf23f
Author: Marcel Raad <address@hidden>
AuthorDate: Fri Oct 27 10:10:30 2017 +0200
memdebug: use send/recv signature for curl_dosend/curl_dorecv
This avoids build errors and warnings caused by implicit casts.
Closes https://github.com/curl/curl/pull/2031
---
lib/memdebug.c | 23 +++++++++++++----------
lib/memdebug.h | 13 +++++++++----
2 files changed, 22 insertions(+), 14 deletions(-)
diff --git a/lib/memdebug.c b/lib/memdebug.c
index 8e61aba71..2b81c26a6 100644
--- a/lib/memdebug.c
+++ b/lib/memdebug.c
@@ -356,29 +356,32 @@ curl_socket_t curl_socket(int domain, int type, int
protocol,
return sockfd;
}
-ssize_t curl_dosend(int sockfd, const void *buf, size_t len, int flags,
- int line, const char *source)
+SEND_TYPE_RETV curl_dosend(SEND_TYPE_ARG1 sockfd,
+ SEND_QUAL_ARG2 SEND_TYPE_ARG2 buf,
+ SEND_TYPE_ARG3 len, SEND_TYPE_ARG4 flags, int line,
+ const char *source)
{
- ssize_t rc;
+ SEND_TYPE_RETV rc;
if(countcheck("send", line, source))
return -1;
rc = send(sockfd, buf, len, flags);
if(source)
- curl_memlog("SEND %s:%d send(%zu) = %zd\n",
- source, line, len, rc);
+ curl_memlog("SEND %s:%d send(%lu) = %ld\n",
+ source, line, (unsigned long)len, (long)rc);
return rc;
}
-ssize_t curl_dorecv(int sockfd, void *buf, size_t len, int flags,
- int line, const char *source)
+RECV_TYPE_RETV curl_dorecv(RECV_TYPE_ARG1 sockfd, RECV_TYPE_ARG2 buf,
+ RECV_TYPE_ARG3 len, RECV_TYPE_ARG4 flags, int line,
+ const char *source)
{
- ssize_t rc;
+ RECV_TYPE_RETV rc;
if(countcheck("recv", line, source))
return -1;
rc = recv(sockfd, buf, len, flags);
if(source)
- curl_memlog("RECV %s:%d recv(%zu) = %zd\n",
- source, line, len, rc);
+ curl_memlog("RECV %s:%d recv(%lu) = %ld\n",
+ source, line, (unsigned long)len, (long)rc);
return rc;
}
diff --git a/lib/memdebug.h b/lib/memdebug.h
index c6b9225f4..6fb8b6851 100644
--- a/lib/memdebug.h
+++ b/lib/memdebug.h
@@ -67,10 +67,15 @@ CURL_EXTERN int curl_socketpair(int domain, int type, int
protocol,
#endif
/* send/receive sockets */
-CURL_EXTERN ssize_t curl_dosend(int sockfd, const void *buf, size_t len,
- int flags, int line, const char *source);
-CURL_EXTERN ssize_t curl_dorecv(int sockfd, void *buf, size_t len, int flags,
- int line, const char *source);
+CURL_EXTERN SEND_TYPE_RETV curl_dosend(SEND_TYPE_ARG1 sockfd,
+ SEND_QUAL_ARG2 SEND_TYPE_ARG2 buf,
+ SEND_TYPE_ARG3 len,
+ SEND_TYPE_ARG4 flags, int line,
+ const char *source);
+CURL_EXTERN RECV_TYPE_RETV curl_dorecv(RECV_TYPE_ARG1 sockfd,
+ RECV_TYPE_ARG2 buf, RECV_TYPE_ARG3 len,
+ RECV_TYPE_ARG4 flags, int line,
+ const char *source);
/* FILE functions */
CURL_EXTERN FILE *curl_fopen(const char *file, const char *mode, int line,
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [gnurl] 06/116: timediff: return timediff_t from the time diff functions, (continued)
- [GNUnet-SVN] [gnurl] 06/116: timediff: return timediff_t from the time diff functions, gnunet, 2017/12/05
- [GNUnet-SVN] [gnurl] 16/116: curl_setup.h: oops, shorten the too long line, gnunet, 2017/12/05
- [GNUnet-SVN] [gnurl] 18/116: resolvers: only include anything if needed, gnunet, 2017/12/05
- [GNUnet-SVN] [gnurl] 35/116: curlx: the timeval functions are no longer provided as curlx_*, gnunet, 2017/12/05
- [GNUnet-SVN] [gnurl] 17/116: HELP-US: rename the subtitle too since the label is changed, gnunet, 2017/12/05
- [GNUnet-SVN] [gnurl] 30/116: cli tool: in -F option arg, comma is a delimiter for files only, gnunet, 2017/12/05
- [GNUnet-SVN] [gnurl] 45/116: url: fix CURLOPT_DNS_CACHE_TIMEOUT arg value check to allow -1, gnunet, 2017/12/05
- [GNUnet-SVN] [gnurl] 15/116: curl_setup: Improve detection of CURL_WINDOWS_APP, gnunet, 2017/12/05
- [GNUnet-SVN] [gnurl] 42/116: CURLOPT_MAXREDIRS: allow -1 as a value, gnunet, 2017/12/05
- [GNUnet-SVN] [gnurl] 19/116: setopt: fix CURLOPT_SSH_AUTH_TYPES option read, gnunet, 2017/12/05
- [GNUnet-SVN] [gnurl] 38/116: memdebug: use send/recv signature for curl_dosend/curl_dorecv,
gnunet <=
- [GNUnet-SVN] [gnurl] 11/116: wildcards: don't use with non-supported protocols, gnunet, 2017/12/05
- [GNUnet-SVN] [gnurl] 24/116: TODO: support multiple Content-Encodings, gnunet, 2017/12/05
- [GNUnet-SVN] [gnurl] 29/116: timeleft: made two more users of Curl_timeleft use timediff_t, gnunet, 2017/12/05
- [GNUnet-SVN] [gnurl] 46/116: CURLOPT_INFILESIZE: accept -1, gnunet, 2017/12/05
- [GNUnet-SVN] [gnurl] 23/116: ROADMAP: cleanup, gnunet, 2017/12/05
- [GNUnet-SVN] [gnurl] 07/116: ftplistparser: free off temporary memory always, gnunet, 2017/12/05
- [GNUnet-SVN] [gnurl] 54/116: Makefile.m32: add brotli support, gnunet, 2017/12/05
- [GNUnet-SVN] [gnurl] 20/116: appveyor: add a win32 build, gnunet, 2017/12/05
- [GNUnet-SVN] [gnurl] 09/116: time: rename Curl_tvnow to Curl_now, gnunet, 2017/12/05
- [GNUnet-SVN] [gnurl] 28/116: cmake: Export libcurl and curl targets to use by other cmake projects, gnunet, 2017/12/05