lib: [c] add ignore_result()

Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
Karel Zak 2011-01-04 21:34:45 +01:00
parent b1d78c939b
commit 06ceeef851
1 changed files with 2 additions and 0 deletions

View File

@ -62,6 +62,8 @@
_max1 > _max2 ? _max1 : _max2; })
#endif
#define ignore_result(x) ({ typeof(x) __dummy = (x); (void) __dummy; })
static inline __attribute__((const)) int is_power_of_2(unsigned long num)
{
return (num != 0 && ((num & (num - 1)) == 0));