Ticket #115 (closed defect: fixed)

Opened 5 years ago

Last modified 5 years ago

Macros for boolean values

Reported by: Knut Landmark Owned by:
Priority: major Milestone:
Component: zoo-kernel Version:
Keywords: Cc:


In ulinet.h, the following conditional macro definition

   #ifndef true
      #define true 1
      #define false -1

is a potential problem because C treats non-zero values as true, so passing the above macro false to a library function with a boolean input parameter will cause unexpected results. The same macro definition appears in service.h (there only for non-Windows platforms). The macro false should probably be defined as 0.

Change History

Changed 5 years ago by djay

  • status changed from new to closed
  • resolution set to fixed

Thanks a lot for this report, this is solved in r621 for ulinet.h and from r618 form service.h.

Note: See TracTickets for help on using tickets.


Context Navigation

ZOO Sponsors

http://www.zoo-project.org/trac/chrome/site/img/geolabs-logo.pnghttp://www.zoo-project.org/trac/chrome/site/img/neogeo-logo.png http://www.zoo-project.org/trac/chrome/site/img/apptech-logo.png http://www.zoo-project.org/trac/chrome/site/img/3liz-logo.png http://www.zoo-project.org/trac/chrome/site/img/gateway-logo.png

Become a sponsor !

Knowledge partners

http://www.zoo-project.org/trac/chrome/site/img/ocu-logo.png http://www.zoo-project.org/trac/chrome/site/img/gucas-logo.png http://www.zoo-project.org/trac/chrome/site/img/polimi-logo.png http://www.zoo-project.org/trac/chrome/site/img/fem-logo.png http://www.zoo-project.org/trac/chrome/site/img/supsi-logo.png http://www.zoo-project.org/trac/chrome/site/img/cumtb-logo.png

Become a knowledge partner

Related links

http://zoo-project.org/img/ogclogo.png http://zoo-project.org/img/osgeologo.png