made ZSTD_isPower2() an inline function
This commit is contained in:
@@ -278,7 +278,11 @@
|
||||
* Alignment check
|
||||
*****************************************************************/
|
||||
|
||||
#define ZSTD_IS_POWER_2(a) (((a) & ((a)-1)) == 0)
|
||||
/* @return 1 if @u is a 2^n value, 0 otherwise
|
||||
* useful to check a value is valid for alignment restrictions */
|
||||
MEM_STATIC int ZSTD_isPower2(size_t u) {
|
||||
return (u & (u-1)) == 0;
|
||||
}
|
||||
|
||||
/* this test was initially positioned in mem.h,
|
||||
* but this file is removed (or replaced) for linux kernel
|
||||
|
||||
Reference in New Issue
Block a user