aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2017-03-20 12:25:08 -0700
committerGuy Harris <guy@alum.mit.edu>2017-03-20 12:25:08 -0700
commitb26a3719eb69f398f9af476bcf2291be7320543e (patch)
tree2b7de22db3fe89e416654b2d454d9bcd7bb54698
parente20839cf45a832dbccb5ccbf132f79b9ac3087e2 (diff)
downloadlibpcap-b26a3719eb69f398f9af476bcf2291be7320543e.tar.gz
Don't call a socket variable "socket".
That collides with the create-a-socket function socket().
-rw-r--r--sockutils.c6
-rw-r--r--sockutils.h6
2 files changed, 6 insertions, 6 deletions
diff --git a/sockutils.c b/sockutils.c
index a19f1081..b6a7299c 100644
--- a/sockutils.c
+++ b/sockutils.c
@@ -554,7 +554,7 @@ int sock_initaddress(const char *host, const char *port,
* \return '0' if everything is fine, '-1' if some errors occurred. The error message is returned
* in the 'errbuf' variable.
*/
-int sock_send(SOCKET socket, const char *buffer, int size, char *errbuf, int errbuflen)
+int sock_send(SOCKET sock, const char *buffer, int size, char *errbuf, int errbuflen)
{
int nsent;
@@ -567,9 +567,9 @@ send:
* sockets when the other end breaks the connection.
* The EPIPE error is still returned.
*/
- nsent = send(socket, buffer, size, MSG_NOSIGNAL);
+ nsent = send(sock, buffer, size, MSG_NOSIGNAL);
#else
- nsent = send(socket, buffer, size, 0);
+ nsent = send(sock, buffer, size, 0);
#endif
if (nsent == -1)
diff --git a/sockutils.h b/sockutils.h
index f50bbce8..6ffadf6c 100644
--- a/sockutils.h
+++ b/sockutils.h
@@ -210,14 +210,14 @@ void sock_geterror(const char *caller, char *errbuf, int errbufsize);
int sock_initaddress(const char *address, const char *port,
struct addrinfo *hints, struct addrinfo **addrinfo,
char *errbuf, int errbuflen);
-int sock_recv(SOCKET socket, void *buffer, size_t size, int receiveall,
+int sock_recv(SOCKET sock, void *buffer, size_t size, int receiveall,
char *errbuf, int errbuflen);
SOCKET sock_open(struct addrinfo *addrinfo, int server, int nconn, char *errbuf, int errbuflen);
int sock_close(SOCKET sock, char *errbuf, int errbuflen);
-int sock_send(SOCKET socket, const char *buffer, int size, char *errbuf, int errbuflen);
+int sock_send(SOCKET sock, const char *buffer, int size, char *errbuf, int errbuflen);
int sock_bufferize(const char *buffer, int size, char *tempbuf, int *offset, int totsize, int checkonly, char *errbuf, int errbuflen);
-int sock_discard(SOCKET socket, int size, char *errbuf, int errbuflen);
+int sock_discard(SOCKET sock, int size, char *errbuf, int errbuflen);
int sock_check_hostlist(char *hostlist, const char *sep, struct sockaddr_storage *from, char *errbuf, int errbuflen);
int sock_cmpaddr(struct sockaddr_storage *first, struct sockaddr_storage *second);