Add necessary parentheses to roundup2() macro.

This commit is contained in:
tsutsui 2009-05-09 04:03:47 +00:00
parent 8de92473d5
commit cd77526abc
1 changed files with 2 additions and 2 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: param.h,v 1.344 2009/04/17 02:38:26 yamt Exp $ */
/* $NetBSD: param.h,v 1.345 2009/05/09 04:03:47 tsutsui Exp $ */
/*-
* Copyright (c) 1982, 1986, 1989, 1993
@ -340,7 +340,7 @@
#endif
#define roundup(x, y) ((((x)+((y)-1))/(y))*(y))
#define rounddown(x,y) (((x)/(y))*(y))
#define roundup2(x, m) (((x) + m - 1) & ~(m - 1))
#define roundup2(x, m) (((x) + (m) - 1) & ~((m) - 1))
#define powerof2(x) ((((x)-1)&(x))==0)
/* Macros for min/max. */