Don't rely on boolean expression evaluating to 1 or 0 by default.
Found by: FlexeLint
This commit is contained in:
parent
30f5ad0faf
commit
9a3454805e
@ -105,7 +105,7 @@ static void setup_8254_mixed_mode(void);
|
||||
* 32-bit time_t's can't reach leap years before 1904 or after 2036, so we
|
||||
* can use a simple formula for leap years.
|
||||
*/
|
||||
#define LEAPYEAR(y) ((u_int)(y) % 4 == 0)
|
||||
#define LEAPYEAR(y) (((u_int)(y) % 4 == 0) ? 1 : 0)
|
||||
#define DAYSPERYEAR (31+28+31+30+31+30+31+31+30+31+30+31)
|
||||
|
||||
#define TIMER_DIV(x) ((timer_freq + (x) / 2) / (x))
|
||||
|
@ -105,7 +105,7 @@ static void setup_8254_mixed_mode(void);
|
||||
* 32-bit time_t's can't reach leap years before 1904 or after 2036, so we
|
||||
* can use a simple formula for leap years.
|
||||
*/
|
||||
#define LEAPYEAR(y) ((u_int)(y) % 4 == 0)
|
||||
#define LEAPYEAR(y) (((u_int)(y) % 4 == 0) ? 1 : 0)
|
||||
#define DAYSPERYEAR (31+28+31+30+31+30+31+31+30+31+30+31)
|
||||
|
||||
#define TIMER_DIV(x) ((timer_freq + (x) / 2) / (x))
|
||||
|
Loading…
Reference in New Issue
Block a user