[Freeciv-Dev] (PR#8648) Bool and type related cleanups
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://rt.freeciv.org/Ticket/Display.html?id=8648 >
> [i-freeciv-lists@xxxxxxxxxxxxx - Sun May 02 09:39:59 2004]:
>
>
> Found by splint.
>
> Highlight:
> - return FALSE;
> + return NULL;
>
> I wonder why this wasn't found by gcc.
>
> Raimar
>
>
Bugs:
@@ -827,10 +827,10 @@
/* UDP can send duplicate or delayed packets. */
server_list_iterate(*lan_servers, aserver) {
- if (!mystrcasecmp(aserver->name, servername)
- && !mystrcasecmp(aserver->port, port)) {
- return lan_servers;
- }
+ if (mystrcasecmp(aserver->name, servername) != 0
+ && mystrcasecmp(aserver->port, port) == 0) {
+ return lan_servers;
+ }
} server_list_iterate_end;
freelog(LOG_DEBUG,
should both be != 0, yes?
- && !unit_list_get(&ptile->units, 0)->occupy) {
+ && unit_list_get(&ptile->units, 0)->occupy) {
why?
I will apply the patch, leaving out these two files.
Bugs unrelated to your patcH:
/* For diamond shaped tiles, every other row is indented.
*/
- if (yy % 2 ^ xx % 2) continue;
+ if ((yy % 2 ^ xx % 2) != 0) {
+ continue;
+ }
oh, my.
* get_drawn should return a boolean I think.
* aiunit.c:2418 - punit->occupy doesn't have any value at the server, I
think.
* aitools.c:192 - new veteran system should be used
* pllayer->diplstates[].has_reason_to_cancel should be renamed since
it's not a boolean.
* game.rgame.killstack should be a boolean.
jason
|
|