Complete.Org: Mailing Lists: Archives: freeciv-dev: December 2003:
[Freeciv-Dev] Re: (PR#7040) Small cleanup packhand.c
Home

[Freeciv-Dev] Re: (PR#7040) Small cleanup packhand.c

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients: ;
Subject: [Freeciv-Dev] Re: (PR#7040) Small cleanup packhand.c
From: "Arnstein Lindgard" <a-l@xxxxxxx>
Date: Wed, 10 Dec 2003 13:00:42 -0800
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=7040 >

On Thu, 4 Dec 2003 13:39:24 -0800 Jason Short wrote:

> You can't assert(punit).  You have to assert(punit != NULL).  This is 
> because of the implementation of assert on some other systems.

grep found one instance.


Arnstein

--- freeciv/ai/aitools.h        Thu Oct  9 02:07:33 2003
+++ assert/ai/aitools.h Wed Dec 10 21:48:41 2003
@@ -25,7 +25,7 @@
 
 #ifdef DEBUG
 #define CHECK_UNIT(punit)                                        \
- (assert(punit),                                                 \
+ (assert(punit != NULL),                                         \
   assert(punit->type < U_LAST),                                  \
   assert(punit->owner < MAX_NUM_PLAYERS + MAX_NUM_BARBARIANS),   \
   assert(find_unit_by_id(punit->id)))

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