summaryrefslogtreecommitdiff
path: root/network_data.c
diff options
context:
space:
mode:
authorDarkvater <darkvater@openttd.org>2006-10-17 23:34:12 +0000
committerDarkvater <darkvater@openttd.org>2006-10-17 23:34:12 +0000
commite97d801d9255d405690141cffc5e3488bb419273 (patch)
tree60abaed2f57035730d0ffc371d9915b76b3426c2 /network_data.c
parent7cdf6f0aff61598ec5d38dc3826ce6d1252248f5 (diff)
downloadopenttd-e97d801d9255d405690141cffc5e3488bb419273.tar.xz
(svn r6816) -Codechange: Some coding style, variable localization, const correctness.
-Codechange: 'quited' is not a word, use has_quit instead for NetworkClientState
Diffstat (limited to 'network_data.c')
-rw-r--r--network_data.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/network_data.c b/network_data.c
index ea2418dc8..2af0f2976 100644
--- a/network_data.c
+++ b/network_data.c
@@ -191,7 +191,7 @@ bool NetworkSend_Packets(NetworkClientState *cs)
uint8 NetworkRecv_uint8(NetworkClientState *cs, Packet *packet)
{
/* Don't allow reading from a closed socket */
- if (cs->quited) return 0;
+ if (cs->has_quit) return 0;
/* Check if variable is within packet-size */
if (packet->pos + 1 > packet->size) {
@@ -207,7 +207,7 @@ uint16 NetworkRecv_uint16(NetworkClientState *cs, Packet *packet)
uint16 n;
/* Don't allow reading from a closed socket */
- if (cs->quited) return 0;
+ if (cs->has_quit) return 0;
/* Check if variable is within packet-size */
if (packet->pos + 2 > packet->size) {
@@ -225,7 +225,7 @@ uint32 NetworkRecv_uint32(NetworkClientState *cs, Packet *packet)
uint32 n;
/* Don't allow reading from a closed socket */
- if (cs->quited) return 0;
+ if (cs->has_quit) return 0;
/* Check if variable is within packet-size */
if (packet->pos + 4 > packet->size) {
@@ -245,7 +245,7 @@ uint64 NetworkRecv_uint64(NetworkClientState *cs, Packet *packet)
uint64 n;
/* Don't allow reading from a closed socket */
- if (cs->quited) return 0;
+ if (cs->has_quit) return 0;
/* Check if variable is within packet-size */
if (packet->pos + 8 > packet->size) {
@@ -271,7 +271,7 @@ void NetworkRecv_string(NetworkClientState *cs, Packet *p, char *buffer, size_t
char *bufp = buffer;
/* Don't allow reading from a closed socket */
- if (cs->quited) return;
+ if (cs->has_quit) return;
pos = p->pos;
while (--size > 0 && pos < p->size && (*buffer++ = p->buffer[pos++]) != '\0') {}