Use roundup2() macro from sys/param.h.

MFC after:	2 weeks.
This commit is contained in:
Marcelo Araujo 2016-04-22 06:23:23 +00:00
parent 9899399c06
commit 61cfb5db60

View File

@ -1105,7 +1105,7 @@ align(int al, int len)
if (al > dcs->d_stralign)
dcs->d_stralign = al;
no = (dcs->d_offset + (al - 1)) & ~(al - 1);
no = roundup2(dcs->d_offset, al);
if (len == 0 || dcs->d_offset + len > no)
dcs->d_offset = no;
}