Add comments
This commit is contained in:
parent
cc5ccd053c
commit
e18d002947
1 changed files with 2 additions and 2 deletions
|
@ -129,11 +129,11 @@ int main(void) {
|
|||
int get_next_free_client_id(void) {
|
||||
for (int i = 0; i < MAX_CLIENTS; i++) {
|
||||
if (clients[i].id == -1) {
|
||||
return i;
|
||||
return i; // i is one below the id where -1 was found
|
||||
}
|
||||
}
|
||||
|
||||
return -1;
|
||||
return -1; // Error: reached end of array
|
||||
}
|
||||
|
||||
/* Thread, parses and handles messages */
|
||||
|
|
Loading…
Reference in a new issue