summaryrefslogtreecommitdiffstats
path: root/include/c.h
diff options
context:
space:
mode:
authorKarel Zak2011-01-04 21:34:45 +0100
committerKarel Zak2011-01-04 21:34:45 +0100
commit06ceeef851dbb9d6c75fed4bb4420bfadacf5d47 (patch)
tree7b2a77510fcf6ed54c1112e5de1aff78e02650a0 /include/c.h
parentdocs: fix typos in man pages (diff)
downloadkernel-qcow2-util-linux-06ceeef851dbb9d6c75fed4bb4420bfadacf5d47.tar.gz
kernel-qcow2-util-linux-06ceeef851dbb9d6c75fed4bb4420bfadacf5d47.tar.xz
kernel-qcow2-util-linux-06ceeef851dbb9d6c75fed4bb4420bfadacf5d47.zip
lib: [c] add ignore_result()
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'include/c.h')
-rw-r--r--include/c.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/c.h b/include/c.h
index bed8f5ba0..cfee616fb 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));