Complete.Org: Mailing Lists: Archives: freeciv-dev: May 2004:
[Freeciv-Dev] (PR#8648) Bool and type related cleanups
Home

[Freeciv-Dev] (PR#8648) Bool and type related cleanups

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: i-freeciv-lists@xxxxxxxxxxxxx
Subject: [Freeciv-Dev] (PR#8648) Bool and type related cleanups
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 4 May 2004 10:32:19 -0700
Reply-to: rt@xxxxxxxxxxx

<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



[Prev in Thread] Current Thread [Next in Thread]