mirror of
https://github.com/moparisthebest/curl
synced 2025-03-01 09:51:46 -05:00
Place parenthesis surrounding macro parameters so that the use of sread and swrite is more intuitive.
This commit is contained in:
parent
86f4cead16
commit
8272874704
@ -246,11 +246,11 @@ typedef unsigned char bool;
|
|||||||
Error: Missing definition of return and arguments types of recv().
|
Error: Missing definition of return and arguments types of recv().
|
||||||
/* */
|
/* */
|
||||||
#else
|
#else
|
||||||
#define sread(x,y,z) (ssize_t)recv((RECV_TYPE_ARG1)x, (RECV_TYPE_ARG2)y, (RECV_TYPE_ARG3)z, (RECV_TYPE_ARG4)SEND_4TH_ARG)
|
#define sread(x,y,z) (ssize_t)recv((RECV_TYPE_ARG1)(x), (RECV_TYPE_ARG2)(y), (RECV_TYPE_ARG3)(z), (RECV_TYPE_ARG4)(SEND_4TH_ARG))
|
||||||
#endif
|
#endif
|
||||||
#else /* HAVE_RECV */
|
#else /* HAVE_RECV */
|
||||||
#ifdef DJGPP
|
#ifdef DJGPP
|
||||||
#define sread(x,y,z) (ssize_t)read_s((int)x, (char *)y, (int)z)
|
#define sread(x,y,z) (ssize_t)read_s((int)(x), (char *)(y), (int)(z))
|
||||||
#endif
|
#endif
|
||||||
#endif /* HAVE_RECV */
|
#endif /* HAVE_RECV */
|
||||||
|
|
||||||
@ -265,11 +265,11 @@ typedef unsigned char bool;
|
|||||||
Error: Missing definition of return and arguments types of send().
|
Error: Missing definition of return and arguments types of send().
|
||||||
/* */
|
/* */
|
||||||
#else
|
#else
|
||||||
#define swrite(x,y,z) (ssize_t)send((SEND_TYPE_ARG1)x, (SEND_TYPE_ARG2)y, (SEND_TYPE_ARG3)z, (SEND_TYPE_ARG4)SEND_4TH_ARG)
|
#define swrite(x,y,z) (ssize_t)send((SEND_TYPE_ARG1)(x), (SEND_TYPE_ARG2)(y), (SEND_TYPE_ARG3)(z), (SEND_TYPE_ARG4)(SEND_4TH_ARG))
|
||||||
#endif
|
#endif
|
||||||
#else /* HAVE_SEND */
|
#else /* HAVE_SEND */
|
||||||
#ifdef DJGPP
|
#ifdef DJGPP
|
||||||
#define swrite(x,y,z) (ssize_t)write_s((int)x, (char *)y, (int)z)
|
#define swrite(x,y,z) (ssize_t)write_s((int)(x), (char *)(y), (int)(z))
|
||||||
#endif
|
#endif
|
||||||
#endif /* HAVE_SEND */
|
#endif /* HAVE_SEND */
|
||||||
|
|
||||||
|
@ -454,7 +454,7 @@ static int get_request(int sock, struct httprequest *req)
|
|||||||
/*** end of httprequest init ***/
|
/*** end of httprequest init ***/
|
||||||
|
|
||||||
while (req->offset < REQBUFSIZ) {
|
while (req->offset < REQBUFSIZ) {
|
||||||
ssize_t got = sread(sock, (reqbuf + req->offset), (REQBUFSIZ - req->offset));
|
ssize_t got = sread(sock, reqbuf + req->offset, REQBUFSIZ - req->offset);
|
||||||
if (got <= 0) {
|
if (got <= 0) {
|
||||||
if (got < 0) {
|
if (got < 0) {
|
||||||
logmsg("recv() returned error: %d", errno);
|
logmsg("recv() returned error: %d", errno);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user