Ticket #115 (closed defect: fixed)
Macros for boolean values
| Reported by: | Knut Landmark | Owned by: | |
|---|---|---|---|
| Priority: | major | Milestone: | |
| Component: | zoo-kernel | Version: | |
| Keywords: | Cc: |
Description
In ulinet.h, the following conditional macro definition
#ifndef true
#define true 1
#define false -1
#endif
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
Note: See
TracTickets for help on using
tickets.













