Corrected datatype of namelen to fix compiler warning
This commit is contained in:
parent
625cecf492
commit
25537d30d3
@ -155,7 +155,7 @@ int listen_sock(uint16_t port, socklen_t *addrlen)
|
|||||||
char *getpeer_ip(int fd, char *ipaddr)
|
char *getpeer_ip(int fd, char *ipaddr)
|
||||||
{
|
{
|
||||||
struct sockaddr_in name;
|
struct sockaddr_in name;
|
||||||
size_t namelen = sizeof(name);
|
socklen_t namelen = sizeof(name);
|
||||||
|
|
||||||
assert(fd >= 0);
|
assert(fd >= 0);
|
||||||
assert(ipaddr != NULL);
|
assert(ipaddr != NULL);
|
||||||
@ -183,7 +183,7 @@ char *getpeer_ip(int fd, char *ipaddr)
|
|||||||
char *getpeer_string(int fd, char *string)
|
char *getpeer_string(int fd, char *string)
|
||||||
{
|
{
|
||||||
struct sockaddr_in name;
|
struct sockaddr_in name;
|
||||||
size_t namelen = sizeof(name);
|
socklen_t namelen = sizeof(name);
|
||||||
struct hostent *peername;
|
struct hostent *peername;
|
||||||
|
|
||||||
assert(fd >= 0);
|
assert(fd >= 0);
|
||||||
|
Loading…
Reference in New Issue
Block a user