diff options
author | Karel Zak <kzak@redhat.com> | 2011-01-04 21:34:45 +0100 |
---|---|---|
committer | Karel Zak <kzak@redhat.com> | 2011-01-04 21:34:45 +0100 |
commit | 06ceeef851dbb9d6c75fed4bb4420bfadacf5d47 (patch) | |
tree | 7b2a77510fcf6ed54c1112e5de1aff78e02650a0 /include | |
parent | b1d78c939bc9d45cb20758c61d56275438eadac0 (diff) | |
download | util-linux-old-06ceeef851dbb9d6c75fed4bb4420bfadacf5d47.tar.gz |
lib: [c] add ignore_result()
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/c.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/c.h b/include/c.h index bed8f5ba..cfee616f 100644 --- a/include/c.h +++ b/include/c.h @@ -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)); |