Bug #2493 » 0034-kick_command-Fix-uninitialized-unique_ipaddr-warning.patch
| server/stdinhand.c | ||
|---|---|---|
|
#define MIN_UNIQUE_CONNS 3
|
||
|
const char *unique_ipaddr[MIN_UNIQUE_CONNS];
|
||
|
int i, num_unique_connections = 0;
|
||
|
const char *unique_ipaddr[MIN_UNIQUE_CONNS]
|
||
|
/* BAD_HEURISTIC_INIT() does not work here, but this is equivalent */
|
||
|
#ifndef FREECIV_TESTMATIC
|
||
|
= { NULL, NULL, NULL }
|
||
|
#endif
|
||
|
;
|
||
|
int num_unique_connections = 0;
|
||
|
if (pconn == caller) {
|
||
|
cmd_reply(CMD_KICK, caller, C_FAIL, _("You may not kick yourself."));
|
||
| ... | ... | |
|
}
|
||
|
conn_list_iterate(game.est_connections, aconn) {
|
||
|
int i;
|
||
|
for (i = 0; i < num_unique_connections; i++) {
|
||
|
if (0 == strcmp(unique_ipaddr[i], aconn->server.ipaddr)) {
|
||
|
/* Already listed. */
|
||
- « Previous
- 1
- 2
- Next »