Complete.Org: Mailing Lists: Archives: freeciv-dev: March 2004:
[Freeciv-Dev] (PR#7942) Don't use == or != to compare strings
Home

[Freeciv-Dev] (PR#7942) Don't use == or != to compare strings

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients: ;
Subject: [Freeciv-Dev] (PR#7942) Don't use == or != to compare strings
From: "Raimar Falke" <i-freeciv-lists@xxxxxxxxxxxxx>
Date: Sun, 14 Mar 2004 07:44:52 -0800
Reply-to: rt@xxxxxxxxxxx

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


The following lines have to be replaced with

./client/gui-gtk/mapview.c:192:    if (ptype->veteran[punit->veteran].name != 
"") {
./client/gui-gtk-2.0/mapview.c:232:    if (ptype->veteran[punit->veteran].name 
!= "") {
./client/climisc.c:1143:  if (ptype->veteran[punit->veteran].name != "") {

if(strcmp(p,"")==0)
  or
if(strlen(p)==0)
  or
if(p[0]!='\0')

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
  "Real Users find the one combination of bizarre
   input values that shuts down the system for days."




[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#7942) Don't use == or != to compare strings, Raimar Falke <=