aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Uhlin <markus@nifty-networks.net>2025-01-26 11:14:10 +0100
committerMarkus Uhlin <markus@nifty-networks.net>2025-01-26 11:14:10 +0100
commit043ce0a0b5e5ccdbed977f3b2a19d43e66488de2 (patch)
tree3fb3bb516a214039e3521d108329300a89b8a4cc
parent47c8ceb46a22710aa717d4b13970d91eb2a4d8c4 (diff)
Fixed -Wshadow
-rw-r--r--FICS/network.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/FICS/network.c b/FICS/network.c
index 1b8f822..0b85b4d 100644
--- a/FICS/network.c
+++ b/FICS/network.c
@@ -331,7 +331,7 @@ net_send_string(int fd, char *str, int format)
PUBLIC int
readline2(comstr_t *cs, int who)
{
- int howmany, state, fd, pending;
+ int howmany, state, fd, v_pending;
unsigned char *start, *s, *d;
static unsigned char ayt[] = "[Responding to AYT: Yes, I'm here.]\n";
@@ -347,11 +347,11 @@ readline2(comstr_t *cs, int who)
}
s = start = con[who].inBuf;
- pending = con[who].numPending;
+ v_pending = con[who].numPending;
fd = con[who].fd;
- if ((howmany = recv(fd, start + pending, MAX_STRING_LENGTH - 1 -
- pending, 0)) == 0) { // error: they've disconnected
+ if ((howmany = recv(fd, start + v_pending, MAX_STRING_LENGTH - 1 -
+ v_pending, 0)) == 0) { // error: they've disconnected
return -1;
} else if (howmany == -1) {
if (errno != EWOULDBLOCK) { // some other error
@@ -365,9 +365,9 @@ readline2(comstr_t *cs, int who)
}
if (con[who].processed)
- s += pending;
+ s += v_pending;
else
- howmany += pending;
+ howmany += v_pending;
d = s;
for (; howmany-- > 0; s++) {
@@ -467,7 +467,7 @@ readline2(comstr_t *cs, int who)
}
PUBLIC int
-net_init(int port)
+net_init(int p_port)
{
int opt;
struct linger lingeropt;
@@ -501,7 +501,7 @@ net_init(int port)
memset(&serv_addr, 0, sizeof serv_addr);
serv_addr.sin_family = AF_INET;
serv_addr.sin_addr.s_addr = htonl(INADDR_ANY);
- serv_addr.sin_port = htons(port);
+ serv_addr.sin_port = htons(p_port);
/*
* Attempt to allow rebinding to the port...