summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Swenson <nks@daterainc.com>2013-10-23 17:35:26 -0700
committerKent Overstreet <kmo@daterainc.com>2013-12-16 14:22:57 -0800
commit97d11a660fd906dbea3dccd2638495d8497c3c81 (patch)
tree4395f2eac70b472cb14afd00f282ebf80681430a
parent9eb8ebeb2471b8cbaa078066aeb85fe5d46f5304 (diff)
bcache: Fix heap_peek() macro
Signed-off-by: Nicholas Swenson <nks@daterainc.com> Signed-off-by: Kent Overstreet <kmo@daterainc.com>
-rw-r--r--drivers/md/bcache/util.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/md/bcache/util.h b/drivers/md/bcache/util.h
index 362c4b3f8b4a..1030c6020e98 100644
--- a/drivers/md/bcache/util.h
+++ b/drivers/md/bcache/util.h
@@ -110,7 +110,7 @@ do { \
_r; \
})
-#define heap_peek(h) ((h)->size ? (h)->data[0] : NULL)
+#define heap_peek(h) ((h)->used ? (h)->data[0] : NULL)
#define heap_full(h) ((h)->used == (h)->size)